PDA

View Full Version : Show full text of grid column cell upon rollover



raydeen
25 Feb 2011, 4:33 PM
I was wondering if it is possible to show the full text of a grid cell (in which the text has been cut off) when the user rolls over it (like in a tooltip kind of way). If so, how would I go about implementing it? Any ideas? :-?
Tony

fay
26 Feb 2011, 1:07 AM
You can do it through a renderer on the grid column, e.g.,



function renderDescription(value, metaData, record, rowIndex, colIndex, store)
{
metaData.attr = 'ext:qtip="' + value + '"';
return value;
}



Note, don't forget to initialise quicktips at the beginning of your onReady:



Ext.onReady(function(){

Ext.QuickTips.init();

// ...
});

smoorthy
26 Sep 2012, 6:18 AM
Even after doing all these stuffs ...
Full text of a grid cell is not displaying when the user rolls over it..
I am using Ext JS Library 3.3.0..
Any ideas will be welcomed
Thank you..

Amun1993
7 May 2014, 12:57 AM
You can really do it through a renderer on the grid column like fay said, but metaData object has attribute tdAttr (not just attr) and that attribute you need to set is 'data-qtip', so...:


function renderDescription(value, metaData, record, rowIndex, colIndex, store){
metaData.tdAttr = 'data-qtip="' + value + '"';
return value;
}