krot

tabulator

Apr 9th, 2018
92
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $("#example-table").tabulator({
  2.      
  3.             movableColumns:true,
  4.             layout:"fitColumns",
  5.             data: [
  6.     {id:1, s:"10", h:"12", g:"red"}, {id:2, s:"10", h:"12", g:"red"}, {id:3, s:"10", h:"12", g:"red"},
  7. ],
  8.             columns:[
  9.                 {title:"v", field:"s", sorter:"number", bottomCalc:"sum", editor:"input"},
  10.                 {title:"g", field:"h", sorter:"number", bottomCalc:"sum", editor:"input"},
  11.                 {title:"h", field:"g", editor:"input"},
  12.                  {formatter:"buttonCross", width:40, align:"center", cellClick:function(e, cell){alert("  row data for: " + cell.getRow().getData().name)}},
  13.    
  14.    
  15.    
  16.                
  17.             ],
  18.         });
  19. http://tabulator.info/docs/3.4
RAW Paste Data