View Full Version : How to access the store's data when store.buffered = true

12 Jun 2012, 6:17 PM
I had a store and I want update it's data :

The correct code with buffered = false :

//buffered = false
var store = Ext.create('Ext.data.Store', {
fields: ...,
proxy: ...


var records = store.data.items; // get All data

//... update records
// the update logic is so complex that I can't just use store.add, store.remove.

store.loadData(records); // reset All data

Now I want to use the "infinite scroll grid" so I set buffered = true.
then I find the code upside can't work, I find that the store cache data with 'pageMap', but there is no functions for the pageMap in the API.

var records = store.data.items; // just get part of the data
// ...

store.loadData(records); // update the data, BUT do not update the pageMap

So I wanna know when store.buffered = true :
1.How to get all data from a store?
2.How to reset all data to a store?


12 Jun 2012, 7:00 PM
I have the same problem in directstore after 4.1, I need to get rawData without connect to server , but I can only get 50 records with buffered. I can't find others anywhere.

13 Jun 2012, 2:32 PM
Please review the following articles:

It examples how buffering pages data.


13 Jun 2012, 9:50 PM
I found the answer by view the src.

var recordsInStore = store.pageMap.getRange(0, pageSize); //get All Data

store.pageMap.addPage(1, recordsInStore);// set Data static
store.loadData(recordsInStore);// update the view