-
5 Apr 2011 5:57 AM #1
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 }, } } }
-
5 Apr 2011 10:53 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 34,119
- Vote Rating
- 453
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.
-
5 Apr 2011 4:11 PM #3Sencha - Community Support Team
- Join Date
- Mar 2007
- Location
- Frederick MD, NYC, DC
- Posts
- 16,170
- Vote Rating
- 33
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
-
[OPEN-126] Model.destroy method doesn't exist
By abierbaum in forum Sencha Touch 1.x: DiscussionReplies: 7Last Post: 6 Feb 2012, 9:19 AM -
Any Examples for ExtJS 3.3 like exist for ExtGWT 2.2?
By halecj in forum Community DiscussionReplies: 2Last Post: 4 Nov 2010, 8:40 AM -
[FIXED][3.2.1] Element.autoHeight() doesn´t exist
By defcon1 in forum Ext 3.x: BugsReplies: 2Last Post: 5 May 2010, 6:48 AM -
Suppress error when container element doesn't exist
By knight in forum Ext 2.x: Help & DiscussionReplies: 2Last Post: 25 Jan 2008, 1:54 AM


Reply With Quote