View Full Version : ExtJS grid column header menu manipulation

13 Mar 2013, 11:06 PM
Would like to change or modify the header menu 'Columns' item, to have only the columns which are current shown, and not hidden.

Suppose, I have 4 columns. And on load of page, 3 columns are visible. So, in the column header menu, only those 3 columns should be there for the user to select from.

Please refer the screenshot.

If you see, the 'Name' column is not in grid, its hidden, but, I am able to see it in the header menu option.

I need to remove the 'Name' column option from menu's 'Columns' items.

Please help.

15 Mar 2013, 11:47 AM
Set hideable to false on the columns that you do not want to be seen in the menu.

15 Mar 2013, 12:36 PM
Ok. Thanks. I implemented that.
But, I want the 'hideable' config to be set as true, on a dynamic basis...
I mean, to hide a column, I can use the setVisible() method. Likewise, I want to configure hideable config in a dynamic fashion.
Please suggest.