Is there a way to programmatically execute any of the items on the drop down menu for a column in a locking grid. I would like to lock and unlock or hide and unhide several columns based on a button in a tool bar on a locking grid. I am using ExtJS 4.0.7.
I tried that early on, but that does not work. With locking grids, it's like there are two grids in the DOM. One is called lockedGrid and one normalGrid. Each has a view and columns. I tried using hide, show and setVisible(false) on these columns, but it does not function. I noticed that when you use the column menu it works fine, so that's why I wondered if I could access the menu and run those options from with in my Javascript.
If you have a grid, with nested columns, and it has locked columns, creating this scenario, when trying to hide/show columns, is it best to hide/show each of the sub columns or just the master column?
Sorry, I thought I had tried that and it had not worked, but I tried it again and it works fine. I did:
grid.down('#date5Column').hide();
where date5Column is the itemId for the column.
Locking and unlocking the the manual for 4.0.7, where I looked, appeared to be a private function and I wasn't sure if I should be using that.
They are private, but they should be pretty stable. They are used by the lock and unlock menu items added when the grid is lockable. I can't see those methods ever going away.