How to retrieve JSON data arrays from an EXTJS store

There is a method that allows me to return my stored data in ExtJS grid panel exactly the same, I load it using:

var data = ["value1", "value2"]
Store.loadData(data);

I want to have a user option to reload the grid, but changes to the store need to be considered . The user can make changes and the grid will be dynamically updated, but if the grid is reloaded, even if the database has been updated with the new changes, the originally loaded data will be displayed. I don’t like to reload the page, just let them reload the grid data itself with the newly changed storage.

I think im looking for something like this:

var data = Store.getData();
//data = ["value1 ", "value2"]

After that, all it says and does. Or there are different ways to refresh the grid with new data, I don’t know. Even using a proxy still uses the “original” data, not the new storage. Thanks in advance

Store.getRange() seems to be what you are looking for . It will return Ext.data.Record []-record array. If no parameters are passed, all records are returned.

There is a method that allows me to return my stored data in ExtJS grid panel exactly the same, I load it using:

var data = ["value1", "value2"]
Store.loadData(data);

I want to have a user option to reload the grid, but changes to the store need to be considered . The user can make changes and the grid will be dynamically updated, but if the grid is reloaded, even if the database has been updated with the new changes, the originally loaded data will be displayed. I don’t like to reload the page, just let them reload the grid data itself with the newly changed storage.

I think im looking for something like this:

var data = Store.getData();
//data = ["value1 ", "value2"]

After that, all it says and does. Or there are different ways to refresh the grid with new data, I don’t know. Even using a proxy still uses the “original” data, not the new storage. Thanks in advance

Store.getRange() seems to be what you are looking for. It will return Ext.data.Record []-record array. If no parameters are passed, all records are returned.

Leave a Comment

Your email address will not be published.