-
27 Apr 2012 7:50 PM #1
Grids - Action Column to behave like a Flyout Menu
Grids - Action Column to behave like a Flyout Menu
Hi there,
I've been looking at using ExtJS for my project and can see that there is a way to embed "actioncolumns" inside of Grid columns. However, my "action" isn't just a single click, it actually needs to show a flyout menu (similar to the Menu control). Is there a direct way to do this in Ext? Or do I have to implement all this functionality myself?
Thanks!
-
27 Apr 2012 9:28 PM #2
Something along these lines?
Code:var menu = Ext.widget('menu', { items: [{ text: 'Action 1' }, { text: 'Action 2' }] }); Ext.widget('grid', { renderTo: Ext.getBody() , width: 300 , height: 300 , columns: [{ text: 'Product' , dataIndex: 'product' , flex: 1 }] , store: { fields: ['product'] , data: [{ product: 'Toaster' }] } , listeners: { itemclick: function (view, record, el, i, e) { menu.showAt(e.getXY()); } , itemcontextmenu: function (view, record, el, i, e) { e.preventDefault(); menu.showAt(e.getXY()); } } });
-
27 Apr 2012 9:44 PM #3
Brilliant. Exactly what I was after. Much easier than I previously thought it would be

Thanks!
-
27 Apr 2012 10:37 PM #4
No problem. Glad I could help.


Reply With Quote