PDA

View Full Version : GridPanel - Dynamic columns add / remove



carlov
31 Jan 2013, 1:34 AM
Hi all

i would like to use this example

http://jsbin.com/otorix

but seems like it's not working properly:

1- edit a cell in first column
2- add a new column

the store is not dirty anymore.
I guess the issue is that the information about the edited cells, which is at record level, should be somehow given to the new store



Ext.define(modelName, {
extend: 'Ext.data.Model',
fields: companyStoreFields
});

var companyStore = Ext.create('Ext.data.Store', {
model: modelName,
data: realData,
proxy: {
type: 'memory',
reader: {
type: 'json',
root: 'items'
}
}
});


Anyone has an idea howto fix it?
Thanks

mitchellsimoens
1 Feb 2013, 1:48 PM
That example is creating a new store and passing it in with the reconfigure. You need to keep the old store.

carlov
5 Feb 2013, 6:57 AM
Hey it works!
Thanks