DataTables warning: table id=table - Cannot reinitialise DataTable. For more information about this error,
I have gone trough following error number of time when I'm using Jquery Data table.
DataTables warning: table id=table - Cannot reinitialise DataTable. For more information about this error,
I have a combo box in the page which lead re bind the Jquary Datatable ,while table is already bind with data.
Flowing solutions are possible to resolve the issue.
- Destroy the table before re bind it . $("#table").dataTable().fnDestroy();
- If condition
if ( $.fn.dataTable.isDataTable('#table') ) {
table = $('#table').DataTable();
}
else {
table = $('#table').DataTable( {
} );
Comments
Post a Comment