I have a sencha touch 2.3 app that has a list which is grouped-
grouped: true,
The grouper function is defined in the store -
grouper: {
groupFn: function(record) {
return record.get('name');
}
}
All this works fine. Now, during runtime, I want to update the grouper function, eg: group it by some other record attribute like location
How do I do this dynamically?
I plan to update the grouper function when the user taps a button (eg: User wants to see the list of records grouped by location)
How to achieve this?
Ext.getStore().getGrouper().setGroupFn(function(){ /* new grouping logic*/ });- Andrea Casaccia