1. #1
    Sencha Premium Member
    Join Date
    Apr 2012
    Posts
    8
    Vote Rating
    0
    antonbabushkin is on a distinguished road

      0  

    Default 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!

  2. #2
    Sencha - Support Team slemmon's Avatar
    Join Date
    Mar 2009
    Location
    Boise, ID
    Posts
    5,369
    Vote Rating
    200
    slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of

      1  

    Default


    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());            
            }        
        }
    });‚Äč

  3. #3
    Sencha Premium Member
    Join Date
    Apr 2012
    Posts
    8
    Vote Rating
    0
    antonbabushkin is on a distinguished road

      0  

    Default


    Brilliant. Exactly what I was after. Much easier than I previously thought it would be

    Thanks!

  4. #4
    Sencha - Support Team slemmon's Avatar
    Join Date
    Mar 2009
    Location
    Boise, ID
    Posts
    5,369
    Vote Rating
    200
    slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of

      0  

    Default


    No problem. Glad I could help.

Thread Participants: 1

Tags for this Thread