View Full Version : switching between grouping store and store

5 Feb 2010, 5:45 AM
My grid is configured with a grouping store.
I need to change my grid's store to a normal store on the click of a button and back to grouping store on another click.
Is it possible?

The grid has ......

view: new Ext.grid.GroupingView({

groupTextTpl: '{text} ({[values.rs.length]} {[values.rs.length > 1 ? "Items" : "Item"]})'

but this will be needed only for a grouping store.

Please help.

5 Feb 2010, 8:17 AM
yes, reconfigure the grid with a new view and model (store)

5 Feb 2010, 12:28 PM
Thank you, jgarcia.
It works properly when i switch from Store to GroupingStore but when i go the other way, an error comes up.
My grid is configured with a GroupingStore and GroupingView as ....

view: new Ext.grid.GroupingView({
getRowClass : function (record, index) {
return '';
return 'redRow';
groupTextTpl: '{text} ({[values.rs.length]} {[values.rs.length > 1 ? "records" : "record"]})'

It is due to this that when i switch to Store, an error comes but i need this for the GroupingStore.

Can I put this config dynamically instead of putting in in the grid?
Please help

5 Feb 2010, 9:56 PM
Can anyone please help with this....