How do I use my custom next() function for the PagingToolbar in Ext JS 2.1?
How do I use my custom next() function for the PagingToolbar in Ext JS 2.1?
I have a need to call my own next() function for the PagingToolbar rather than the default moveNext() function because I'm calling SOAP services to get the data back. I'm not using a proxy in the store and I pass a JSON object to the store.loadData function. Each time next or previous pages are selected I need to call my own functions which hits the service. What method is the best way to do this? I've seen override and addListener examples but I don't know where to begin. Here is how I've created the paging toolbar which is essentially copied from the paging example.
var grid = new Ext.grid.GridPanel({
el:'grid-placeholder',
width:700,
height:500,
title:'Results - Test',
store: store,
cm: cm,
trackMouseOver:false,
sm: new Ext.grid.RowSelectionModel({selectRow:Ext.emptyFn}),
loadMask: true,
viewConfig: {
forceFit:true,
enableRowBody:true
},
bbar: new Ext.PagingToolbar ({
pageSize: 25,
store: store,
displayInfo: true,
displayMsg: 'Displaying records {0} - {1} of {2}',
emptyMsg: "No records to display"
})
});
Thanks.
Last edited by AudiGeist; 14 Apr 2010 at 11:01 AM.
Reason: code formatting