-
7 Feb 2012 5:05 AM #1
hiding all column in ColumnModel with CheckboxSelectionModel
hiding all column in ColumnModel with CheckboxSelectionModel
Hi, I'm using ColumnModel with CheckboxSelectionModel in my gridpanel. This is my source code:
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.Code:return new Ext.grid.ColumnModel([ new Ext.grid.CheckboxSelectionModel({checkOnly: true}), { header: 'filename', dataIndex: 'filename', width: 120 },{ header: 'filepath' dataIndex: 'path', width: 270 } ]);
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 #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 34,121
- Vote Rating
- 453
Do you have an error?
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
7 Feb 2012 6:03 PM #3
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 #4
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...d-plugins.html


Reply With Quote