Cannot reinitialise JQuery DataTable

前端 未结 9 623
北恋
北恋 2020-12-13 19:32

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

9条回答
  •  执笔经年
    2020-12-13 20:05

    I know this is an OLD question. But this is for anyone else having similar issue.

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

    $("#dataTable").dataTable().fnDestroy();
    

提交回复
热议问题