Ext分页问题
var grid_accountsTypeList = new Ext.grid.EditorGridPanel({
title: '账目类型管理',
iconCls: 'icon-grid',
loadMask: {msg : '数据加载中...'},
region: 'center',
cm: cm_accountsType,
ds: ds_accountsType,
sm: new Ext.grid.RowSelectionModel({singleSelect : true}),
//autoWidth: true,
//store: ds_accountsType,
enableColumnMove: false,
trackMouseOver: false,
frame: true,
autoExpandColumn: 'remark',
clicksToEdit: 1,
tbar:[btn_AddAccountsType,'-',btn_delAccountsType],
bbar: new Ext.PagingToolbar({
pageSize: 10,
store: ds_accountsType,
displayInfo: true,
displayMsg: '第 {0} - {1} 条 共 {2} 条',
emptyMsg: "没有记录"
}),
listeners: {
'afteredit': function(e) {
Ext.Ajax.request({
url: 'accountTypeList.do?action=edit',
params: {
id: e.record.data.id,
accountsName: e.record.get("accountsName"),
totalMoney: e.record.get("totalMoney"),
remark: e.record.get("remark")
},
failure: function() {
Ext.Msg.show({
title: '错误提示',
msg: '修改数据发生错误,操作将被回滚!',
fn: function() {
e.record.set(e.field, e.originalValue);
},
buttons: Ext.Msg.OK,
icon: Ext.Msg.ERROR
});
}
});
}
}
});
//代理加载,初始化面板数据
grid_accountsTypeList.store.load({params:{start:0, limit:10}});
在载入时显示10条信息。可是添加后就变成20条了。
我不知道怎么样把pageSize的值传到Action里。怎么样把limit和pageSize的值设置成一样。然后传到后台。
如果我的后台把所有的数据都读出来。能不能再对这个些数据进行分页。。