1. #1
    Ext JS Premium Member
    Join Date
    Apr 2011
    Posts
    53
    Vote Rating
    0
    eja40 is on a distinguished road

      0  

    Default e.getTarget() doesn't exist in ExtJS 4.0b1?

    e.getTarget() doesn't exist in ExtJS 4.0b1?


    When we have a grid with an icon button (e.g. delete icon) in the right hand column we would trap the cellclick and test for the presence of <div class="controlBtn"> using e.getTarget.

    Now with ExtJS 4.0b1 we receive "e.getTarget is not a function"

    I cannot find any reference to this in the docs either.

    How do I achieve what is described in the Grid FAQ (5.5) "How to add a column with tools for each record?" http://www.sencha.com/learn/Ext_FAQ_Grid

    Code:
    test = new Ext.grid.GridPanel({
            store: store,
            viewConfig: {
                stripeRows: true,
                emptyText:'No rows to display',
                listeners: {
                    cellClick: function(view, record, item, index, e){
                        console.log(e.getTarget('.controlBtn')); /// e.getTarget is not a function
                    },
                }
            }
    }

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    St. Louis, MO
    Posts
    34,119
    Vote Rating
    453
    mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of

      0  

    Default


    It's in the docs so it should be working.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    http://www.JSONPLint.com - Source to lint your JSONP!

    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 almost in print!

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

  3. #3
    Sencha - Community Support Team jay@moduscreate.com's Avatar
    Join Date
    Mar 2007
    Location
    Frederick MD, NYC, DC
    Posts
    16,170
    Vote Rating
    33
    jay@moduscreate.com is just really nice jay@moduscreate.com is just really nice jay@moduscreate.com is just really nice jay@moduscreate.com is just really nice

      0  

    Default


    is e an Ext.EventObject?

    Jay Garcia @ModusJesus || Modus Create co-founder
    Ext JS in Action author
    Sencha Touch in Action author

    Get in touch for Ext JS & Sencha Touch Touch Training

    We are also working on Video-based Sencha Touch training: Check it out here.

Similar Threads

  1. [OPEN-126] Model.destroy method doesn't exist
    By abierbaum in forum Sencha Touch 1.x: Discussion
    Replies: 7
    Last Post: 6 Feb 2012, 9:19 AM
  2. Any Examples for ExtJS 3.3 like exist for ExtGWT 2.2?
    By halecj in forum Community Discussion
    Replies: 2
    Last Post: 4 Nov 2010, 8:40 AM
  3. [FIXED][3.2.1] Element.autoHeight() doesn´t exist
    By defcon1 in forum Ext 3.x: Bugs
    Replies: 2
    Last Post: 5 May 2010, 6:48 AM
  4. Suppress error when container element doesn't exist
    By knight in forum Ext 2.x: Help & Discussion
    Replies: 2
    Last Post: 25 Jan 2008, 1:54 AM