How to refresh Jquery datatables in order to account for newly added rows? -
i json request , fill table in dom rows , call .datatable() make datable. instead of ajax call various reasons.
now want add rows table (by manipulating dom , adding rows manually). how can 'refresh' or 'reload' datatables account these new rows?
thanks!
when need reinitalise datatable, use destroy() method. re-initialise normal.
var table = $("#table").datatable(); // table updated addrow(); // destroy outdated table table.destroy(); // create new instance of datatables table = $("#table").datatable();
Comments
Post a Comment