PDA

View Full Version : ExtJS grid column header menu manipulation



Ronits
13 Mar 2013, 11:06 PM
Hi,
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.
42386

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.

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

Ronits
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.