grid指定列排序 ext js
1个回答
展开全部
给你个小例子
ProjectStore = new Ext.data.GroupingStore({
proxy: new Ext.data.HttpProxy({
url: "DATA/ProjectInfo/ProjectInfo.aspx",
method: "POST"
}),
reader: new Ext.data.JsonReader({
fields: projectfields,
root: "data",
totalProperty: "totalCount"
}),
sortInfo: {
field: 'region', //你要排序的列
direction: "ASC" //排列顺序
},
remoteSort: true //服务器端排序
});
SortInfo为对某列排序的代码。注意如果gridpanel采用了分页,要加上 remoteSort: true
ProjectStore = new Ext.data.GroupingStore({
proxy: new Ext.data.HttpProxy({
url: "DATA/ProjectInfo/ProjectInfo.aspx",
method: "POST"
}),
reader: new Ext.data.JsonReader({
fields: projectfields,
root: "data",
totalProperty: "totalCount"
}),
sortInfo: {
field: 'region', //你要排序的列
direction: "ASC" //排列顺序
},
remoteSort: true //服务器端排序
});
SortInfo为对某列排序的代码。注意如果gridpanel采用了分页,要加上 remoteSort: true
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询