-
6 Dec 2012 6:28 AM #1
Get current cell for tooltip
Get current cell for tooltip
I've got a tooltip like the example from the docs:
Code:var view = grid.getView(); var tip = Ext.create('Ext.tip.ToolTip', { // The overall target element. target: view.el, // Each grid row causes its own separate show and hide. delegate: view.itemSelector, // Moving within the row should not hide the tip. trackMouse: true, // Render immediately so that tip.body can be referenced prior to the first show. renderTo: Ext.getBody(), listeners: { // Change content dynamically depending on which element triggered the show. beforeshow: function updateTipBody(tip) { tip.update('Over company "' + view.getRecord(tip.triggerElement).get('company') + '"'); } } });
I need to get the current column of the mouse position. How can I get them? I'm using Ext 4.1.1a.
-
8 Dec 2012 6:39 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,582
- Vote Rating
- 433
You should be able to get the element node so if you make sure it's the <td> then you can find the index of that <td> in the <tr> and then you have the index of the column.
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.


Reply With Quote