-
7 Jan 2013 5:17 AM #1
disable grouping feature does not disable column menu "group by this field"
disable grouping feature does not disable column menu "group by this field"
Ext version tested:
4.1.3.548
Browser versions tested against:
FF16
Description:
Defining a grid panel and a store like this
I would assume thatCode:var localStore = Ext.create('Ext.data.JsonStore', { name: 'localStore', fields: ['name', 'data', 'skill'], data: [ { 'name': 'metric one', 'data': 10, 'skill':'skill3' }, { 'name': 'metric two', 'data': 7, 'skill':'skill3' }, { 'name': 'metric three', 'data': 5, 'skill':'skill3' }, { 'name': 'metric four', 'data': 2, 'skill':'skill2' }, { 'name': 'metric five', 'data': 27, 'skill':'skill1' } ] }); var sampleGrid = Ext.create('Ext.grid.Panel', { title: 'Sample store', store: localStore, width: 700, height: 700, features: [ Ext.create('Ext.grid.feature.GroupingSummary', { id: 'groupSummary', groupHeaderTpl: '{name} ({rows.length})' }) ], columns: [ { text: 'name', dataIndex: 'data', width:300}, { text: 'skill', dataIndex: 'skill' } ], height: 200, width: 400, renderTo: Ext.getBody() });
will disable the grouping feature AND disable the grouping-column Menu ("group by this field")Code:sampleGrid.getView().getFeature('groupSummary').disable();
However even after using the "disable" method on the feature, the column menu in the grid panel can still be clicked by the user. Thus "disabling" the grouping feature is only possible by iterating over all configured columns and set the "groupable" property to "false"
This will then also disable the column menu "Group by this field".Code:for (var i in sampleGrid.columns) { console.log("disable groupable on column" + sampleGrid.columns[i].dataIndex); sampleGrid.columns[i].groupable = false; }
However I would assume that using the
I can achieve the same effect without the need to iterate over all defined columns.Code:getFeature('groupSummary').disable()Last edited by imc-pp; 7 Jan 2013 at 5:29 AM. Reason: corrected test case
-
7 Jan 2013 9:05 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,640
- Vote Rating
- 435
Thanks for the report! I have opened a bug in our bug tracker.
You found a bug! We've classified it as
EXTJSIV-8168
.
We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.


Reply With Quote