Quantcast
Channel: Free community support — DataTables forums
Viewing all articles
Browse latest Browse all 35271

Inserting data dynamically

$
0
0
jsvar table = $('#table').dataTables({
  "columns": [
     {"title": "Col 1", "width": "80%"},
     {"title": "Col 2", "width": "20%"},
  ]
});

$('#btnAddData').click(function () {
   var arr = [
       [1, 2],
       [2, 3]
   ];
   table._fnClearTable();
   table._fnAddData(arr);
   table._fnReDraw(); // or  table._fnDraw();
});

Dont Work


Viewing all articles
Browse latest Browse all 35271

Trending Articles