Results 1 to 2 of 2

Thread: Accessing itemcontextmenu params from menu

  1. #1
    Sencha Premium Member
    Join Date
    Oct 2012
    Posts
    24
    Answers
    1
    Vote Rating
    2
      0  

    Default Accessing itemcontextmenu params from menu

    Hi,

    I'm fairly new to the whole context menu thing, but I've been working through the action grid example here:

    http://docs.sencha.com/ext-js/4-1/#!/example/menu/action-grid.html

    T
    his has been pretty helpful, but it assumes that the menu action handler has a named reference to the grid object in the current binding. I'm looking to use a factory of sorts and while I might be able to structure such that I can form a closure or get the binding right, it'd be more flexible if I could just access the arguments to the itemcontexthandler through the menu item. Barring that, if I could traverse from the action through the menu up to the parent grid, I could make do with that. Ultimately I just want the record for the current row.

    I'm sure I could come up with a way to do this, but is there something built-in to ExtJS for this sort of stuff? Or what's the best practice around it?

    Thanks,
    Kevin

  2. #2
    Sencha Premium Member
    Join Date
    Oct 2012
    Posts
    24
    Answers
    1
    Vote Rating
    2
      0  

    Default

    A menu factory method seems to work fine. Since I'm not anticipating a lot of right-clicks here, GC shouldn't be a problem. So I could just roll with this. But I'd still be interested in knowing if from either the "widget" or "event" arguments if one could get a handle to the row/record/grid that was clicked on.

Posting Permissions

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