PDA

View Full Version : GridPanel paging in ExtJs



nitija
19 Nov 2012, 1:29 AM
Hi , I am trying to create paging ( Page number 1, 2,3) on extjs gridpanel using follwing lines of code.

var reportStore = Ext.create('Ext.data.Store', {
storeId: 'allReportStore',
model: 'ReportListModel',
pageSize:20
------
---------
}
In GridPanel i have below code ,
dockedItems: [{
xtype: 'pagingtoolbar',
store: Ext.data.StoreManager.lookup('allReportStore'), // same store GridPanel is using
dock: 'bottom',
displayInfo: true
}] ,

But this doesn't work, When store in loaded for the first time , it shows all record instead of displaying record as specified in "pageSize" in Store Definition.

Kindly help:-?

mitchellsimoens
21 Nov 2012, 9:26 AM
Paging should be done server side, you only return the dataset you want to show.