When I load my page in first place there nothing in the table and the datatable is not initializated, after a few interactions rows are added and when all rows are added (wi
When you initialize the datatable set bDestroy: true and before adding the update clear table via $('#myTable').dataTable().fnClearTable();
. Thats it!!
to clear the table, oTable.api().clear().draw();
to reload data from ajax, oTable.api().ajax.reload();
I don't think reInit is a good manner
Can you use fnUpdate
and fnClearTable
? http://datatables.net/api
use the initialization variable bDestory
. Not nDestroy.
Calling $('#table').dataTable().fnDestroy();
will clear the table of dataTable
code and allow you to manipulate the table, and then call dataTable
on it again.