Looking to create multiple grids on a single panel using an accordion layout? I'll be dynamically generating all the grids based on metaData in JSON and handling metachange listener events on my store to reconfigure the grid. But here's the question - can I have one JSON file with metaData and data for multiple grids, allowing me to use separate stores to read from it?
Here's what I'm thinking:
"grid1" :
{
"metaData" : {---"root":"data1"-----------}
},
"grid2" :
{
"metaData" : {----"root":"data2"----------}
},
"data1" : {------------------},
"data2" : {-----------------}
I've tried using the metaProperty tag in my store without success (using ExtJs 4.1.3).
Store Proxy:
proxy: {
type: 'ajax',
url: 'MultiData.json',
reader: {
type: 'json'
// metaProperty : 'grid1', //Doesn't work, hence commented
}
Store Listener:
'metachange': function (store, meta) {
Grid.reconfigure(store, meta.columns);
}
NOTE: The above code functions fine with just one metaData and data tag in the JSON file.