you can still do it with applying it to each column manually, but it does not look as clean than before + it was 2 ext instances before. it is like if you would replace the first param store with the fields-array (not even the model ).

so, to not break compatibility i suggest that you make the 2nd param optional: columns / colModel and check if it is an array or not.

In the first releases of ext 4, it was only possible to specify an array of columns when creating a grid. Later on (beta3+, don't know for sure) it was also allowed again to set the "colModel" directly:

Hi Ed,
I've got a question related to the original problem. I have a grid whose list of columns is dynamic. So every time I change the columns in the grid I call grid.reconfigure to change the store and the list of columns. I create a new store every time the columns change, but what should I do about the model for the new store?

I see two options:
1) create a new model with a dynamically generated name each time I need a new column list. I understand that using the model is the suggested way of doing such stuff in ExtJS4, but still having so many dynamic models which are not used later seems rather silly

2) use the 'fields' property of the store, whenever creating the new store, which seems cleaner but not recommended by Sencha...

No need for eval or anything like that (and also note the "var" statement in my replacement above - previously you'd been leaking a global variable there. In fact there's really no need to create that var in the first place, your function should just be:

can you please give me some hints regarding:
# how would you redefine a model?
# how can you remove a model and define it again?
# how can you modify a the already defined model relations: i.e. adding a new field to a existent model=

dynamic model for existing store

Hi edspencer,

I am creating store for my chart. And I have to update store's model before I am reloading the store.
Please let me know the way to do show.
I have used setModel() method to update store model but its not reflecting after store reload.