[Conclusion] jQuery datatable plug-in usage Problems

Source: Internet
Author: User

$ (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

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.