View Full Version : PagingToolbar Not Working ?

26 Mar 2010, 10:00 AM
My paging toolbar is not working, that is, it doesnt appy paging to my gridpanel at all and whole lot of info shows at once causing my window (containing gridpanel) sized so large that it gets out of screen....
I have a store like this:

var megaStore = new Ext.data.ArrayStore({
And this store is used by my grid and pagetoolbar like this:

var manageCustomerWindowGrid = new Ext.grid.GridPanel({
store: megaStore,
hideHeaders: true,
//disableSelection: true,
autoExpandColumn: 'customerName', autoExpandMin: 550, autoHeight: true
autoExpandColumn: 'customerName', autoExpandMin: 550, autoHeight: true,
cm: new Ext.grid.ColumnModel({
{ id:'customerName', header: "CustomerName", dataIndex: 'CustomerName', renderer: function(value,p,r){ return String.format("<b>{0}</b><br /><span style='color: gray'>{1}<br />{2}<br />{3}</span><br />", value, r.data['VehicleNumber'], r.data['DeviceType'], r.data['VehicleName']); }}
trackMouseOver: false,
bbar: new Ext.PagingToolbar({
pageSize: 5,
store: megaStore,
displayInfo: true,
displayMsg: 'Displaying Customers {0} - {1} Of {2}',
emptyMsg: "No Customers To Display"
And my store is filled with data manually like this:

// Calls Server method to get JSON response
success: function(basicFrom, action)
Ext.iterate(action.result.data, function(prop, value)
newDataRow = {
VehicleId: prop,
VehicleNumber: value['VehicleNumber'],
CustomerName: value['CustomerName'],
DeviceType: value['DeviceType'],
CustomerId: value['CustomerId']
newRecord = new megaStore.recordType(newDataRow);