view
variable in your groupclick
event listener contain instance of Ext.view.Table
. But you have to call collapseAll()
method on instance of Ext.grid.feature.Grouping
feature which you use in your grid for grouping.
So your grid config should be like this:
features: [{
ftype:'grouping',
startCollapsed: true
}],
listeners: {
groupclick: function (view, node, group, e, eOpts) {
view.features[0].collapseAll();
view.features[0].expand(group);
}
}
See live example in this fiddle: https://fiddle.sencha.com/#fiddle/2f8