Detach and attach store from ExtJs control

137 Views Asked by At

How can I remove and add store from any ExtJs control? At the run time, I should be able to remove and add store to ExtJs controls like Grid, TreePanel etc.

1

There are 1 best solutions below

0
On

Take a look at bindStore: http://docs.sencha.com/extjs/4.1.2/#!/api/Ext.view.AbstractView-method-bindStore

Alternatively, if you're not changing the fields and only the data, you could choose to use store.loadData and set the append option to false.