Hi.
We're using the Grid Panel and I was asked to add quick access to the column hider menu which is normally a submenu of the grid header.
The first thing I tried was to create a button and a new menu:

Code:
var headerCt = gridcomp.getHeaderContainer();
new Ext.menu.Menu({
                items: headerCt.getColumnMenu(headerCt)
            });
btncomp.setMenu(hiderMenu,false);
The problem with this is: the checkboxes are not synched with the original submenu. When I uncheck a column in one, it stays checked in the other.

Currently, I have the following:

Code:
  var headerCt = gridcomp.getHeaderContainer();
  // TODO: getMenu() is private
  var hiderMenu = headerCt.getMenu().down('menu'); // first submenu
  btncomp.setMenu(hiderMenu,false);
  hiderMenu.addListener("hide", function() { btncomp.setMenu(hiderMenu,false); }); // workaround can't hover menu
It sets the existing submenu to the button. This way I don't have unsynched checkboxes. However, I had to use the private method getMenu() to get the parent menu and there was also a problem that if previously shown as a submenu, the menu was instantly hiding when I tried to hover it.