1. #1
    Sencha - Support Team slemmon's Avatar
    Join Date
    Mar 2009
    Location
    Boise, ID
    Posts
    5,470
    Vote Rating
    202
    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 [4.1 B1] Get grid's cell on context click

    [4.1 B1] Get grid's cell on context click


    In Ext 3 I'd use the gridpanel's cellclick, cellcontextmenu, and celldblclick events and use those to evaluate which column was clicked. I didnt' see those events in 4.0.x and was hoping they'd be introduced in the grid enhancements/fixes in 4.1. I'm not seeing them, though.

    Is there a good way to get the column clicked (or more to the point context-clicked) in 4.1?

    Thx

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,347
    Vote Rating
    846
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    The grid panel has the event itemcontextmenu
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha - Support Team slemmon's Avatar
    Join Date
    Mar 2009
    Location
    Boise, ID
    Posts
    5,470
    Vote Rating
    202
    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


    It looked like the itemcontextclick event furnishes just the:
    • view
    • model
    • row HTMLElement
    • row index
    • Ext.EventObject
    • opts

    Didn't look like the column/cell index was a param, but maybe I'm overlooking it?

  4. #4
    Sencha Premium Member skirtle's Avatar
    Join Date
    Oct 2010
    Location
    UK
    Posts
    3,605
    Vote Rating
    326
    skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future

      0  

    Default


    I believe the cell events do exist they just aren't documented:

    http://www.sencha.com/forum/showthread.php?144666

    From looking at the code it seems that the view fires a number of events prefixed with 'beforecell' and 'cell' (do a quick search for those strings in ext-all-debug). I don't think they all get relayed by the grid though, seems just cellclick and celldblclick are passed through.

    You should mention this on the documentation bugs thread if you want to get them added to the docs:

    http://www.sencha.com/forum/showthread.php?135037

  5. #5
    Sencha - Support Team slemmon's Avatar
    Join Date
    Mar 2009
    Location
    Boise, ID
    Posts
    5,470
    Vote Rating
    202
    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


    Ok. I added it to the documentation bugs thread you linked to. I'm also going to input a feature request for either cellcontextclick like in 3.x or I'd be good with itemclick, dblclick, contextclick, et al to have a reference to the column element and index like the cell events had in 3.x.

    EDIT: request added - http://www.sencha.com/forum/showthre...284#post709284

Thread Participants: 2