首先是Store的配置
//autoLoad: true, 这里不能设置为true,否则一打开页面就会加载,这时还没传递参数,所以就会报错
model: 'WebKikan.model.sales.employees',
remoteSort: false,
proxy: {
type: 'ajax',
url: '',
actionMethods : {
read : 'POST' // Store设置请求的方法
},
reader: {
type: 'json',
rootProperty: 'data',
totalProperty: 'totalCount'
}
}然后在Controller里面获取Store,配置参数
var grid = me.lookupReference('custMngtGrid'),//先获取grid
store = grid.getStore();//再获取store
store.getProxy().url = surl;//动态设置URL
store.load({params: {OFFICE: 3, CUSTCD: 1087}});//传递参数
7230

被折叠的 条评论
为什么被折叠?



