Results 1 to 3 of 3

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

  1. #1
    Ext JS Premium Member
    Join Date
    Apr 2011
    Posts
    53
    Vote Rating
    1
      0  

    Default 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 - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,556
    Vote Rating
    1272
      0  

    Default

    It's in the docs so it should be working.
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

    Check out my GitHub, lots of nice things for Ext JS and Sencha Touch
    https://github.com/mitchellsimoens

  3. #3
    Sencha User jay@moduscreate.com's Avatar
    Join Date
    Mar 2007
    Location
    DC Area =)
    Posts
    16,364
    Vote Rating
    86
      0  

    Default

    is e an Ext.EventObject?

Similar Threads

  1. [OPEN-126] Model.destroy method doesn't exist
    By abierbaum in forum Sencha Touch 1.x: Discussion
    Replies: 8
    Last Post: 11 Mar 2016, 3:23 PM
  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() doesnt 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

Posting Permissions

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