Data Store with hierachical data linked to multiple data grids
Data Store with hierachical data linked to multiple data grids
I have a fairly standard JSON structure with multiple sub-arrays. When I load the data I want to be able to use the data loaded in multiple data grids - each linked to a separate data grids.
In the example JSON below I would have 2 grids, Users and Depts.
What I am trying to avoid is having to repeat the same JSONP call to create a new store with a different root and different fields.
I load my store :
mainStore = new Ext.data.JsonStore({
root: 'items[0].users',
fields: [ 'id', 'name'],
proxy: new Ext.data.ScriptTagProxy({
url: "myUrl"
})
});