$ (Window). load (function (){
$ ('# Managertable'). dataTable ({
"BServerSide": true,
"BAutoWidth": true,
"BStateSave": false, // It is very important to save the status to the cookie *****. When you search, a page refresh will cause the search to disappear. You can avoid using this attribute to set true.
"BPaginate": true, // whether to use pagination
"BProcessing": true, // indicates whether a processing prompt is displayed.
"BLengthChange": false, // whether to enable or not to set the number of records displayed on each page
"IDisplayLength": 20, // default number of records displayed per page
"BFilter": true, // whether to use search
"BJQueryUI": true, // jQuery is used in the page style.
// "SScrollY": 200, // height of the tbody area of the vertical scroll bar
"SScrollX": "100%", // horizontal scroll bar
"SScrollXInner": "100% ",
"BScrollCollapse": true,
"AoColumns": [{"sTitle": "Id "},
{"STitle": "Name "},
{"STitle": "Permission "},
{"STitle": "Remarks"}],
"SPaginationType": "full_numbers", // pagination Style
"BAutoWidth": true, // The column width is adaptive according to the table width.
"BSort": false, // whether to use sorting
"AaSorting": [[0, "desc"],
"SAjaxSource": "/action/admin/index. ashx? Paraname = admingroupmanager & sub_detail_id = "+ $. cookies. get ('sub _ detail_id ')
});
});
The following is the ajaxsource response:
[{"Id": 1, "Name": "Administrator Group", "Permission": "100,110,120,130,200,210,220,300,310,320,330,400,410,420,430,500,510,520,600,610,620,630,631,632,633,634,640,700,710,720,730,740,800,810,820,830", "Remarks": ""}]
Unable to bind: var aData = _ fnGetObjectDataFn (oSettings. sAjaxDataProp) (json); // The json here contains response data.
For (var I = 0, iLen = aData. length; I <iLen; I ++)
What aData obtains here is: undefined; it is fixed here,
This problem occurs now:
Showing 1 to NaN of NaN entries (filtered from NaN total entries)
DataTables warning (table id = 'managertable'): Requested unknown parameter '0' from the data source for row 0