gpt4 book ai didi

jquery - JQGrid真实滚动问题

转载 作者:行者123 更新时间:2023-12-01 04:20:27 25 4
gpt4 key购买 nike

我的 JqGrid 代码如下所示

$('#grid').jqGrid({
url: '',
scroll: 1,
postData: {
...
},
datatype: "json",
mtype: 'POST',
colNames: [....],
colModel: [{
name: 'source',
index: 'source',
width: '100',
align: 'center',
stype: 'select',
searchoptions: {
dataUrl: 'getSource'
}
}, { ...
}],
rowNum: 200,
height: '450px',
autowidth: false,
shrinkToFit: true,
rownumbers: true,
pager: '#table-page',
sortname: '...',
viewrecords: true,
sortorder: 'asc',
caption: "Records",
emptyrecords: "Empty records",
loadonce: false,
loadComplete: function() {
....
},
jsonReader: {
....
}
});

当我缓慢滚动网格并达到 200 时,网格会重新加载,但 View 显示 2000 中的 View 1-400。

如果我继续缓慢滚动,那么我会看到 2000 个 View 中的第 1-600 个 View 。

我们还可以在演示 http://www.trirand.com/blog/jqgrid/jqgrid.html 中看到这一点-> 3.7 中的新增功能 -> True Scrolling 并看到相同的错误。

有人可以建议我一个解决方法吗?

最佳答案

它按设计工作......如果您缓慢滚动,它会向表中添加记录 - 因此您可以向上滚动,数据仍然存在 - 如果您快速滚动,则当前数据将被删除,并且仅使用添加新数据您在与滚动位置匹配的起始点指定的行数

关于jquery - JQGrid真实滚动问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11105772/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com