copeit
27 Feb 2015, 4:54 AM
Hi everybody,
I wanna display the Menu of the Header of a grid in the Menu of a button.
Lets say we have a grid with 5 columns, 3 are hidden.
{
xtype: 'button',
text: 'Columns',
listeners: {
menushow: function(thisButton, thisMenu) {
var headerMenu= this.up("tagEditorPanel").down("tabpanel").getActiveTab().getHeaderMenu(); // <== returns thisGrid.headerCt.getMenu();
thisMenu.removeAll();
thisMenu.add(thisFirstColumn.items.items);
return true;
}
},
menu: [{ }]
}
My Idea was to have an listener on the Button and add the Menu dynamically.
Basically it shows the menu, but the menu doesnt work.
Do you know a better approach?
Thanks,
markus
I wanna display the Menu of the Header of a grid in the Menu of a button.
Lets say we have a grid with 5 columns, 3 are hidden.
{
xtype: 'button',
text: 'Columns',
listeners: {
menushow: function(thisButton, thisMenu) {
var headerMenu= this.up("tagEditorPanel").down("tabpanel").getActiveTab().getHeaderMenu(); // <== returns thisGrid.headerCt.getMenu();
thisMenu.removeAll();
thisMenu.add(thisFirstColumn.items.items);
return true;
}
},
menu: [{ }]
}
My Idea was to have an listener on the Button and add the Menu dynamically.
Basically it shows the menu, but the menu doesnt work.
Do you know a better approach?
Thanks,
markus