【发布时间】:2019-10-04 08:09:04
【问题描述】:
我需要使用虚拟按需加载模式 - jqGrid 上的滚动条分页与 JSON 本地文件,因为该文件包含 12.800 行(3.3Mb),并且当一次加载时几乎冻结我的 Chrome(并且绝对杀死我的 IE11) .所以我的问题是,是否可以使用我的本地 JSON 实现 this?
这是我的代码(现在我只请求“data3.json”文件(包含 12.800 行)的前 100 行:
$('#table').jqGrid({
datatype: 'json',
url: "data3.json",
colNames: ['', 'TUBE ID'],
colModel: [
{ name: 'selector', index: 'selector'},
{ name: 'tube_id', index: 'tube_id'}
],
viewrecords: true,
scroll: 1, // set the scroll property to 1 to enable paging with scrollbar - virtual loading of records
emptyrecords: 'Scroll to bottom to retrieve new page', // the message will be displayed at the bottom
pager: "#jqGridPager",
rowNum: 100
});
任何帮助将不胜感激:)
【问题讨论】:
标签: jquery jqgrid autoscroll