So I have the grid
which obviously has some store
and on beforerender
event I want to change the store of the grid? Can I do that ? If yes, how ?
6
votes
I don't understand you people. If you know the answer no matter how simple it is why don't you write it instead of just downvoting the question ? I mean what will I get from that ? I won't get no answer? I won't get nothing. come on people.
– Dimitri
Its a legitimate question, +1 from me to restore the balance. Chris's answer below should do the trick.
– SW4
I upvoted too, Extjs Documentation is confusing and ill-organized which makes newbs have a hard time finding anything.
– Reimius
Finally, people who can think straight. Thanks, Chris's solution worked as expected.
– Dimitri
1 Answers
9
votes
The reconfigure
method should do this for you:
reconfigure ([store], [columns])
Reconfigures the grid with a new store/columns. Either the store or the columns can be omitted if you don't wish to change them.
http://docs-origin.sencha.com/extjs/4.1.3/#!/api/Ext.grid.Panel-method-reconfigure