I\'m using jquery datatables to display data inside grid. On init page load script take DateTime.Today and process them further, problem is after init page load, when I\'m t
The DataTables API has changed, but this error is still thrown if you try to reinitialize the datatable again.
You can check if it is already created with:
$.fn.DataTable.isDataTable("#myTable")
And to destroy it so that it can be recreated again:
$('#myTable').DataTable().clear().destroy();
It is not the most efficient way, but it works. It should be possible to update the table without destroying it first, just using clear
and row.add
, but I haven't found a way of doing that when the data source is an array passed to the constructor.