我有一个数据表,它使用服务器端分页和无限滚动。因此,当我向下滚动表格时,我的页面会加载。现在默认页面大小为 10。我如何覆盖这个数字? 我尝试设置 iDisplayLength:50,但没有成功。
ListDataTable= $("#ListDataPane_data").dataTable({
"iDisplayLength":50,
"bFilter": true,
"bServerSide": true,
"sServerMethod": "POST",
"sAjaxSource": ListResourcePaginationUrl,
"bProcessing": true,
"sPaginationType": "full_numbers",
"bJQueryUI": false,
"bDestroy": true,
"bScrollInfinite": true,
"sScrollY": "300px",
"sScrollX": "963px",
"fnServerParams": function (aaData) {
aaData.push(
{ "name": "Status", "value": status}
);
});
},
请帮忙。
最佳答案
可能是server doesn't respect iDisplayLength 值。在这种情况下,您还必须更新服务器端。
关于javascript - 在jquery数据表服务器端分页中指定页面大小,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18608216/