PDA

View Full Version : Paging Store does not work for local data



atul.sachan@capgemini.com
22 Nov 2011, 3:41 AM
I am using ExtJs 4 'Ext.toolbar.Paging' for local data but pagination is not working here.

// Data
var gridData = [['7354','29/03/2011','003','Lution PDC','12345678','Standard','Shipped','30/03/2011','123232145','PDF'],
['7354','29/03/2011','003','Lution PDC','12345678','Standard','Shipped','30/03/2011','123232145','PDF'],
['7354','29/03/2011','003','Lution PDC','12345678','Standard','Shipped','30/03/2011','123232145','PDF'],
['7354','29/03/2011','003','Lution PDC','12345678','Standard','Shipped','30/03/2011','123232145','PDF'],
['7354','29/03/2011','003','Lution PDC','12345678','Standard','Shipped','30/03/2011','123232145','PDF']];

// Store
var gridDataStore = Ext.create('Ext.data.ArrayStore', {fields: [{name: 'cusPONum'},{name: 'orderDate'},{name: 'facilityCode'},{name: 'facility'},{name: 'gmOrderNo'},
{name: 'orderType'},{name: 'orderStatus'},{name: 'lstShipment'},{name: 'lstShipmentNum'},{name: 'pdfimg'},],
data: gridData,autoLoad: false, pageSize:1
});

// loading a store
gridDataStore.load({
params : {
start : 0,
limit : 1
}
});
/// paging toolbar
dockedItems: [{
xtype: 'pagingtoolbar',
store: gridDataStore, // same store GridPanel is using
dock: 'bottom',
//width:150,
displayInfo: false,
items :[{xtype:'button',text:'Export to Excel',width:100,style :{marginLeft:'500px'}},
{xtype:'button',text:'Print Preview',width:100,style :{marginLeft:'20px'}}]
}],

could you please suggest any solution for the same?
Thanks.

tobiu
22 Nov 2011, 4:18 AM
you already have the answer in the thread of the UX for ext js 3:
http://www.sencha.com/forum/showthread.php?71532-Ext.ux.data.PagingStore-v0.5&p=668809&viewfull=1#post668809

atul.sachan@capgemini.com
22 Nov 2011, 4:45 AM
could you please suggest any example for
Ext.ux.data.PagingMemoryProxy (http://docs.sencha.com/ext-js/4-0/#) ?I tried but it is not working for me.

tobiu
22 Nov 2011, 5:23 AM
http://dev.sencha.com/deploy/ext-4.0.7-gpl/examples/grid/buffer-grid.html