PDA

View Full Version : problem with Ext.ux.data.PagingMemoryProxy



BMS-User
6 Jun 2011, 5:26 AM
Hi,

i have a GridPanel that gets data from an Ajax call and stores it in an Ext.data.Store object.
The url is defined for the store:



newGridStore = new Ext.data.Store({
url: getReportOutput(buildParamArray(), true, 'HTML', null),

reader: new Ext.data.DynamicJsonReader({
root: 'ResultData.Data'

}),

proxy: new Ext.ux.data.PagingMemoryProxy()
});


What i need is a additional pagingToolBar to display a piece of the large data list.

I already tried it with Ext.ux.data.PagingMemoryProxy but the defined "load" function will not be called. Here is where i call the loader:



newGridStore.load({

params: {

start: 0,

limit: 10
},

callback: function(r, options, success){

if (success == true) {



newGridStore.recordType = newGridStore.reader.recordType;

newGridStore.fields = newGridStore.recordType.prototype.fields;





newCm = new Ext.grid.DynamicColumnModel(newGridStore);

gridBar.bindStore(newGridStore);


bufferedResultGrid.reconfigure(newGridStore, newCm);

bufferedResultGrid.autoSizeColumns();

}

else {
...


}

);

}

}
});


So i first fill the store with json data (this works without paging-function)!!!
The grid will be rendered fine!

But i don`t know how to store the data once, and filter it then with the functionality of PagingMemoryProxy.

Can someone tell me how to do this?