PDA

View Full Version : Change grouping in grouping view



iceblast_01
16 Feb 2011, 10:51 PM
is it posible to change the groupingfield of a grouping store then refresh the grouping view?

I tried:


var store = new Ext.data.GroupingStore({
reader: new Ext.data.JsonReader({
...
},
[{name: 'date'},{name:'email'},...]
}),
groupField: 'date' //the grid is currently grouped by date
});

var grid = new Ext.grid.GridPanel({
store:store,
view: new Ext.grid.GroupingView({
...
})
});

//this button changes the grouping from date to be grouped by email
button.on('click',function(){
store.groupField='email';
grid.getView().refresh(true);
});

iceblast_01
16 Feb 2011, 10:59 PM
Kindly delete this post thanks, sorry for duplicates