welshcathy
12 Nov 2012, 11:46 AM
I have a list which is initially rendered ungrouped on a store with no grouper function defined.
I use the following code to dynamically change this to a grouped list
var store = list.getStore();
store.setGrouper(<grouper function>);
list.setGrouped(true);
This used to work in Touch 2.0.1 but now there's an error in Ext.dataview.List as headerIndices are not defined during the all to list.setGrouped(true);
They are only updated on list.refresh();
Suggested patch to Ext.dataview.List
updateGrouped: function(grouped) {
var me = this,
baseCls = this.getBaseCls(),
cls = baseCls + '-grouped',
unCls = baseCls + '-ungrouped';
if (grouped) {
// START OF PATCH
if (!me.headerIndices){
me.findGroupHeaderIndices();
}
// END OF PATCH
me.addCls(cls);
me.removeCls(unCls);
me.updatePinHeaders(me.getPinHeaders());
}
......
Sorry don't have time to post an example right now .. hope you can work with this...
I use the following code to dynamically change this to a grouped list
var store = list.getStore();
store.setGrouper(<grouper function>);
list.setGrouped(true);
This used to work in Touch 2.0.1 but now there's an error in Ext.dataview.List as headerIndices are not defined during the all to list.setGrouped(true);
They are only updated on list.refresh();
Suggested patch to Ext.dataview.List
updateGrouped: function(grouped) {
var me = this,
baseCls = this.getBaseCls(),
cls = baseCls + '-grouped',
unCls = baseCls + '-ungrouped';
if (grouped) {
// START OF PATCH
if (!me.headerIndices){
me.findGroupHeaderIndices();
}
// END OF PATCH
me.addCls(cls);
me.removeCls(unCls);
me.updatePinHeaders(me.getPinHeaders());
}
......
Sorry don't have time to post an example right now .. hope you can work with this...