I am working with datatables example and getting an error like this when loading page: Datatables warning(table id = \'example\'): cannot reinitialise data table. To retriev
This problem occurs if we initialize dataTable more than once.Then we have to remove the previous.
On the other hand we can destroy the old datatable in this way also before creating the new datatable use the following code :
$(“#example”).dataTable().fnDestroy();
There is an another scenario ,say you send more than one ajax request which response will access same table in same template then we will get error also.In this case fnDestroy method doesn’t work properly because you don’t know which response comes first or later.Then you have to set bRetrieve TRUE
in data table configuration.That’s it.
This is My senario: