Skip to content


Cannot reinitialise JQuery DataTable

 

Try adding “bDestroy”: true to the options object literal, e.g.

$('#dataTable').dataTable({
    "bServerSide": true,
    ....
    "bDestroy": true
});

You should destroy the old dataTable assignment. Before creating the new datatable use the following code

$(“#dataTable”).dataTable().fnDestroy();

Posted in Javascript, jquery. Tagged with , .

0 Responses

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.

You must be logged in to post a comment.