PDA

View Full Version : Paging toolbar refresh and next not working



ragendu
2 Aug 2012, 9:50 PM
Hi,
I have to implement paging in my grid. The paging toolbar appears, but the next, previous or refresh is not working. The grid is populated with values, but when I click on the refresh icon or next, previous, the grid becomes blank. No values are present
Could some body please help me on this?

Below is the code snippet I have for this.

var MyStore = new Ext.data.JsonStore({
totalProperty : 'DATASET',
root : 'ROWS',
url : 'store.cfc',
id : 'objectstore',
remoteSort : true,
baseParams : {
method : 'getCustomObjectList',
returnFormat : 'JSON',
subjectarea : '',
dir : ''
},
reader : new Ext.data.JsonReader({
totalProperty : 'DATASET',
root : 'ROWS'
}, customobjs),
fields : [
'OBJECT_NAME',
'OBJECT_DESCRIPTION',
'OBJECT_TABLE_ALIAS',
'UPDATED_BY',
'ACTIVE'

]
});

var pagingToolBar = new Ext.PagingToolbar({
pageSize : 15,
id : 'pagingToolbar',
store : MyStore,
displayInfo : true,
displayMsg : 'Displaying jobs {0} - {1} of {2}',
emptyMsg : "No jobs to display"
//plugins : new Ext.ux.SlidingPager()
});




xtype : 'grid',
store : MyStore,
height : 350,
width : '',
stripeRows : true,
autoExpandColumn : 'object_name',
header : false,
loadMask : true,
autoScroll : true,
id : 'customObjectGrid',
bbar : pagingToolBar,
selModel : new Ext.grid.RowSelectionModel({
listeners: {
beforerowselect: function(selModel, rowIndex, keepExisting, record){
Ext.getCmp('editMenuItem').enable();
}
}
})

Thanks in advance...