Ext


Go Back   Ext JS Forums > Ext JS Premium Forums > Ext: Feature Requests

Reply
 
Thread Tools
  #1  
Old 12-03-2006, 12:30 AM
jarrod jarrod is offline
Ext JS Premium Member
 
Join Date: Mar 2007
Posts: 287
jarrod is on a distinguished road
Default Suggestion: Tooltips for grid cells

Will be useful to have built-in grid cell tooltip option support, especially for cells with text which tend to exceed the column width.
Reply With Quote
  #2  
Old 12-03-2006, 01:14 AM
jarrod jarrod is offline
Ext JS Premium Member
 
Join Date: Mar 2007
Posts: 287
jarrod is on a distinguished road
Default

Disregard this post, just realised that the latest svn build passes the td element to the column cell renderer... tooltip setting is now easy. Thanks.
Reply With Quote
  #3  
Old 03-08-2007, 08:55 PM
amc amc is offline
Ext User
 
Join Date: Mar 2007
Posts: 14
amc is on a distinguished road
Default

I need to do exactly this. Please could you post a code fragment to explain how?
Reply With Quote
  #4  
Old 03-08-2007, 08:56 PM
amc amc is offline
Ext User
 
Join Date: Mar 2007
Posts: 14
amc is on a distinguished road
Default

Ideally I need the whole row's data in a tooltip.
Reply With Quote
  #5  
Old 03-10-2007, 10:24 PM
Belgabor Belgabor is offline
Ext User
 
Join Date: Mar 2007
Posts: 140
Belgabor is on a distinguished road
Default

The rows record is sent as the third parameter to the cell renderer (see the paging grid example) so you should be able to build the tooltip from that.
Reply With Quote
  #6  
Old 03-21-2007, 05:18 AM
jack.slocum's Avatar
jack.slocum jack.slocum is offline
Ext JS - Development Team
 
Join Date: Mar 2007
Posts: 6,941
jack.slocum is on a distinguished road
Default

The second param is a template parameter object. One of the predefined parameter is attr which can be used to add attributes to the cell content element:

function renderFoo(value, p, record){
     p.attr = 'title="some tooltip"';
     return value;
}
QuickTips:

function renderFoo(value, p, record){
     p.attr = 'ext:qtip="some tooltip"';
     return value;
}
QuickTips with title:
function renderFoo(value, p, record){
     p.attr = 'ext:qtip="some tooltip" ext:qtitle="Tooltip Title!"';
     return value;
}
__________________
Jack Slocum
Ext JS - Core Development Team
jack@extjs.com
Reply With Quote
  #7  
Old 05-07-2007, 02:33 PM
AlexJG's Avatar
AlexJG AlexJG is offline
Ext User
 
Join Date: Mar 2007
Location: Cambridge, England
Posts: 53
AlexJG is on a distinguished road
Send a message via MSN to AlexJG Send a message via Skype™ to AlexJG
Default

Quote:
Originally Posted by jack.slocum View Post

QuickTips with title:
function renderFoo(value, p, record){
     p.attr = 'ext:qtip="some tooltip" ext:qtitle="Tooltip Title!"';
     return value;
}
Tried this Jack and it works great except the tooltip is only displayed if the mouse is placed after the data rendered in the cell
__________________
Regards

Alex

You want it done when !!!!
Reply With Quote
  #8  
Old 05-07-2007, 04:29 PM
tryanDLS tryanDLS is offline
Ext JS - Community Support Team
 
Join Date: Mar 2007
Posts: 7,411
tryanDLS is on a distinguished road
Default

What would there be to show if you haven't rendered the data in the cell, and it would seem haven't called grid.render yet?
__________________
Tim Ryan - Ext JS Support Team
Read BEFORE posting a question / BEFORE posting a Bug
Use Google to Search - API / Forum
API Doc (3.x | 2.x | 1.x) / FAQ / Wiki / Tutorials / 1.x->2.0 Migration Guide
Reply With Quote
  #9  
Old 05-07-2007, 04:34 PM
AlexJG's Avatar
AlexJG AlexJG is offline
Ext User
 
Join Date: Mar 2007
Location: Cambridge, England
Posts: 53
AlexJG is on a distinguished road
Send a message via MSN to AlexJG Send a message via Skype™ to AlexJG
Default

Not sure what you mean but perhaps I didn't explain to well.

After the grid has been rendered the tooltip is only displayed when the mouse is after the text in the cell.
__________________
Regards

Alex

You want it done when !!!!
Reply With Quote
  #10  
Old 05-07-2007, 08:51 PM
jack.slocum's Avatar
jack.slocum jack.slocum is offline
Ext JS - Development Team
 
Join Date: Mar 2007
Posts: 6,941
jack.slocum is on a distinguished road
Default

Is your text wrapped in an element by a renderer?
__________________
Jack Slocum
Ext JS - Core Development Team
jack@extjs.com
Reply With Quote
Reply

Thread Tools

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Customizing Grid Cells sanmatp Ext: Help 9 10-08-2009 06:12 AM
Icons in grid cells soad Ext 1.x: Help 4 10-22-2007 10:22 AM
Grid not setting "left" for row cells davidelias Ext 1.x: Help 6 04-02-2007 06:03 AM
Tooltips on text-only buttons? fecund Ext 2.x: Help 4 03-10-2007 09:52 AM
Grid Header Tooltips tryanDLS Ext: Open Discussion 7 11-28-2006 08:11 AM

All times are GMT -5. The time now is 09:38 AM.

© 2006-2009 Ext, LLC
Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.