is it possible to have infinte scrolling in a extJS (4.1) grid, whose data-store is loaded manually?
myStore = Ext.create('Ext.data.Store', {
fields:givenStoreFields,
data: [[]],
});
myGrid = Ext.create('Ext.grid.Panel', {
store: myStore,
columns: givenColumns,
});
In my case I fetch data from the server, the data is tweaked, and then loaded into the store manually.
myStore.loadData(fetchedAndTweaked);
Since fetchedAndTweaked contains many rows, rendering is very slow, and slows the entire browser. Therefore I want to add parameters to myGryd and myStore to have “infinite” scrolling (on the data-set fetchedAndTweaked).
However: All examples I find, the dataStore has some proxy/reader etc.
//Thanks
You can, if you use
buffered: trueconfig on your store as described in the Ext JS 4.1.3 docs:.As noted above, you will also have to set the
pageSizeconfig on the store to what you want it.A word of warning: you don’t find any examples of local stores with infinite scrolling because the number of records to make infinite scrolling viable exceeds the number of records which you should reasonably keep in a local store.
In other words the rendering is not the only thing that slows down the browser, it’s also the amount of data you are trying to process locally.
If you feel you need to implement infinite scrolling it’s probably time to convert to a remotely loaded data store.