Results 1 to 2 of 2

Thread: Add menu item to grid hd menu

  1. #1
    Sencha User
    Join Date
    Nov 2011
    Posts
    1

    Default Add menu item to grid hd menu

    Hi all,

    what I would like to do is add a menu item to a grids hd menu. This is not a big thing at all, I can do it with the following lines of code

    Code:
    'afterrender': function() {
    Ext.getCmp('my_grid').view.hmenu.add({
    text: 'my menu item', 
    disabled: true,
    handler: function() {}});
    }
    But what I don't know is how I can control via a flag in grids meta data (I use metagrid plugin) which columns have this menu item enabled and which disabled or hidden.

    Are there any code examples how to enable/disable or hide menu items in grids hd menu for some columns? I couldn't find any but I saw in Ext.ux.grid.GridFilters that this is possible even though I couldn't get how they do it.

    Thank you! I'm looking forward for your answers.

    Kind regards, Dirk

  2. #2
    Sencha Premium User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,448

    Default

    Look at how the filters add menu items to only certain columns.
    Mitchell Simoens @LikelyMitch

    Check out my GitHub:
    https://github.com/mitchellsimoens

    Posts are my own, not any current, past or future employer's.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •