PDA

View Full Version : qtip on a Grid cell



Radius-Service
1 Sep 2011, 3:58 AM
How to display a hint?
In "Extjs 3" worked the following way

renderer: function (value, metadata, record, rowIndex, colIndex, store) {
metadata.attr = 'ext:qtip="' + value + '"';
return value;
}
But in the new version is not "metadata.attr" and "ext:qtip".

I solved the problem this way:

return "<div data-qtip='my <b>title</b>'>"+value+"</div>";

Is this the right way? Or is there a good one?

tobiu
1 Sep 2011, 7:01 AM
http://docs.sencha.com/ext-js/4-0/#!/api/Ext.tip.QuickTipManager



// Add a quick tip to an HTML button
<input type="button" value="OK" data-qtitle="OK Button" data-qwidth="100"
data-qtip="This is a quick tip from markup!"></input>


so basically



metadata.attr = 'data-qtip="' + value + '"';


should work.

skirtle
1 Sep 2011, 5:50 PM
Ignoring the escaping issues it would be:


renderer: function(value, metaData) {
metaData.tdAttr = 'data-qtip="' + value + '"';
return value;
}

Radius-Service
1 Sep 2011, 7:11 PM
Thanks, skirtle response is more accurate in the matter.