View Full Version : hiding all column in ColumnModel with CheckboxSelectionModel

7 Feb 2012, 5:05 AM
Hi, I'm using ColumnModel with CheckboxSelectionModel in my gridpanel. This is my source code:

return new Ext.grid.ColumnModel([
new Ext.grid.CheckboxSelectionModel({checkOnly: true}),
header: 'filename',
dataIndex: 'filename',
width: 120
header: 'filepath'
dataIndex: 'path',
width: 270

It works well. But when I uncheck all fields on the menu of ColumnModel, some problem happened. I can never check my field back, because I cannot open the menu of ColumnModel.

The design of ColumnModel do not allow to uncheck all fields on the menu of ColumnModel and leaving last one field on it. But CheckboxSelectionModel is one member Column of ColumnModel. I can uncheck all fields except CheckboxSelectionModel.

For ColumnModel, there is still one field left on the ColumnModel, but CheckboxSelectionModel disabled the menu of Column. I can't get other fields back by checking the field on the menu.

I must missed some property or some technique. Does anybody know how to fix this?

7 Feb 2012, 6:13 AM
Do you have an error?

7 Feb 2012, 6:03 PM
No, there is no error. But this behavior would bothering user.
Once all columns were hided manually except CheckboxSelectionModel itself, which is not hidable with column menu disabled, we can never show/un-hide any column back because we don't have column menu to click and check.

3 Sep 2012, 10:14 AM
In version 4.x behavior was changed by not allowing all columns to be hidden [1].
I wonder how it was implemented and whether it is possible to replicate to version 3.4?

Thank you.

[1] - http://dev.sencha.com/deploy/ext-4.1.0-gpl/examples/grid/grid-plugins.html