In the EXTJS 3, I am defining a data store and grid, it is working fine. now the issue is the paging, I want to manually control 'Next' button event.
I tried to use 'beforechange' event in the paging, but it doesn't work, because it is 'BEFORE'. how to manually load the store with parameter value ?
The server side is C#.
Thanks
The store is
var store = new Ext.data.DirectStore({
storeId: 'store',
directFn: Report.Function1,
autoLoad: false,
paramsAsHash: false,
paramOrder: 'param1|start',
....
fields: [ ... ],
remoteSort: false,
});
The paging is
var pager = new Ext.PagingToolbar({
store: store,
displayInfo: true,
pageSize: this.pageSize,
listeners: {
beforechange: function (paging, params) {
currentPage = params.start;
report_search(params);
}
}
});
function report_search(page) {
var store = Ext.StoreMgr.lookup('store');
store.removeAll();
store.load({
params: {
param1: Ext.getCmp("param1").getValue(),
start: page.start
}
});
}