PDA

View Full Version : Extjs MVC Structure



riseofandroid
3 May 2012, 10:36 PM
Hi,

I am new to Extjs, I need to get the coloumn in dynamic from an json do I use the following structure in the store is it correct way ?


/* Store to list records */
store = Ext.create('Ext.data.Store', {
name : 'Store12',
autoLoad: false,
autoSync: true,
items: [{
xtype: 'MyPanel'
}],
model: 'INSTANCE.model.Instance',
proxy: {
type: 'rest',
url: 'datafeild.json'
},
});

store.load({
callback : function(r, options, success){
grid.reconfigure(store,r[0].store.proxy.reader.fields);
grid.show();
}
});

mitchellsimoens
7 May 2012, 6:56 AM
So you want to use the fields from the reader which gets the fields from the model as columns?

riseofandroid
12 May 2012, 6:11 AM
Yes i need to get dynamic