我使用的是jqGrid。我已经实现了多列搜索,通过搜索工具栏(完全在服务器端处理),并使用虚拟滚动来加载记录。但当我单击重新加载网格时,prams中的所有搜索字段都会自动消失,所以这没有问题,但排序列的值仍然存在,即sidx&抱歉。所以当我点击重新加载网格而不是获取新的记录时,我得到的是正在排序的记录。有没有办法处理这个。。。。?
jQuery("#jqgrid").jqGrid({
url: 'http://localhost:7887/application/get',
mtype: 'GET',
datatype: "json",
colNames: ['AppId', 'Name', 'Rank'],
colModel: [
{name: 'AppId', key: true, width: 80,search: true, searchoptions: { searchOperators: true, sopt: ['gt', 'eq','lt'],} },
{ name: 'Name', width: 150, search: true, sorttype: 'text', searchoptions: { sopt: ['eq', 'bw', 'ew','cn'] } },
{ name: 'Rank', width: 350, search: true },
],
width: 800,
rowNum: 100,
height: 180,
scroll: 1,
viewrecords: true,
gridview: true,
loadonce:false,
caption: "Loading data while scrolling",
onSelectRow: jqGrid_RowSelectd,
emptyrecords:"there are no records to display",
pager:"#gridpager"
});
$("#jqgrid").filterToolbar({ autosearch: true, searchOperators: true, sopt: ['gt', 'eq'] });
$("#jqgrid").navGrid('#gridpager', { del: false, add: false, edit: false }, {}, {}, {}, { multipleSearch: true });
});