0
votes

I am loading a store and filtering on store. So all filtered data are coming under each group. Now When I will clcik on a particular group, I want to clear the filter for that particular group so that I can get all records under that group.

Default: afterrender of grid using store.filter(somecondition). All groups are expanded

Want to collapse any group and when again I will expand at that time I want to display all records under that group.

Thanks for your help !!

1
Now I tried to use filter on store. On GroupClick used clearfilter. So all groups shown all records Then again applied filter based on the GroupName and Previous filter. But this is not the best solutionaswininayak
Some sample code would be very helpful.John Hall

1 Answers

0
votes

Assuming that you can tie your group names to the filter on your store, you could simply listen for the groupexpand event (http://docs.sencha.com/extjs/4.2.1/#!/api/Ext.grid.feature.Grouping-event-groupexpand) and take action on your store, i.e.

function onGroupExpand( view, node, group, eOpts ) {
    store.clearFilter(true);
    store.filter( newCondition without group );
}