更新时间:2022-06-01 07:09:23
尝试在商店中设置这些:
Try setting these on the store:
remoteGroup:true,
remoteSort: true
在你的sql或你用来通过分组字段获取数据排序。
And in you sql or what you use to get data out sort by grouping field first.
gridDataStoreObj = new Ext.data.GroupingStore(
{
remoteGroup:true,
remoteSort: true,
proxy: new Ext.data.HttpProxy({url: 'index.php' }),
method:'POST',
groupField:'brandName',
...
sortInfo:{field: 'id', direction: "ASC"},
});
在服务器上:
select * from table order by brandName, id
这应该对组本身进行排序。
This should sort groups themselves.