javascript - how to add data in datatable? -


i trying add data dynamically in datatable.i have initialized table on document.ready , created instance of it.after that, trying add data in table using instance.

$(document).ready(function() {    //initialize tooltips      table_sgdfile_list_linked = $('#sgdfile_list_linked').datatable({      bsort: false,      destroy:true,      blengthchange: false,      pagelength: 4,      columns: [{          title: "name"        },        {          title: "action"        }      ]    });    });

i trying bind data

table_sgdfile_list_linked.data(dataset)

but not working.

my_list = $('#my-table-html-id').datatable( {     "processing": true,     "serverside": false,     "paging": true,     "blengthchange" : true,     "bfilter": false,     "pagelength": 10,     "info": false,     "ordering": true,     "ajax": "path-of-my-api",     "columndefs": [         {             "render": function ( data, type, row ) {                 var html = data + " modified!";                 return html;             },             "orderable": false,             "targets": 1 //last column         },     ], }) 

Comments

Popular posts from this blog

javascript - Create a stacked percentage column -

Optimising Firebase database by automatically overwriting data -

javascript - Angular UI-Grid customTemplate directive causing rows to load slowly/? -