aDataSort error of undefined or null reference for diffrent columnlist

浪子不回头ぞ 提交于 2019-12-25 01:49:20

问题


I have integrated datatable for the result set for the fixed columnlist and it's working fine. The issue am facing currently is, based on the selection of the dropdownlist, I want to load different columnlist with the search result. But when I'm trying to do, it will give error of aDataSort error of undefined or null reference if the columnlist / result set are empty.

So is there any solution to disable "DataSort" property from the datatable property? I ahve tried by assigning, "aaSorting":"null" / "aaSorting":"undefined" / "aaSorting":"[[]]" but it doesn't work out for me.

Appreciated for your help.


回答1:


I have just added bellow code before DataTable data binding in ajax success function..

Code:

var table = $('#insideGrid').DataTable();
 table.destroy();


来源:https://stackoverflow.com/questions/27089925/adatasort-error-of-undefined-or-null-reference-for-diffrent-columnlist

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!