PDA

View Full Version : Tool tip not working



babu
11 Feb 2010, 1:53 AM
Hi all,

I have initialized tool tip
Ext.QuickTips.init();

and
function renderFoo(value, p, record){

p.attr = 'ext:qtip='+value+' ext:qtitle=Title';

return value;

}

But it not showing the tool tip when i mouseover to row...

Please help me..

rbastic
11 Feb 2010, 6:05 AM
Why aren't you setting the Extjs object directly using the 'qtip' method?

babu
11 Feb 2010, 8:00 AM
Can you give me little more information

Eugen_
11 Feb 2010, 9:30 AM
But it not showing the tool tip when i mouseover to row...
Hi babu,

the tool tip code:



var tip = new Ext.Tip({
title: 'Title',
width: 200
});
add this to your grid panel:



listeners: {
'mouseover': function(e, t) {
var row = yourGridPanel.getView().findRow(t);
if (row) {
var record = yourGridPanel.getStore().getAt(row.rowIndex);
if (tip.rendered) {
tip.body.update(record.get('field_for_tooltip'));
} else {
tip.html = record.get('field_for_tooltip');
}
tip.showAt([e.getXY()[0] + 10, e.getXY()[1] + 10]);
}
}
},

ToNiC
11 Feb 2010, 7:43 PM
@babu I think you are missing quotes around the value.
I.e.



p.attr = 'ext:qtip="'+value+'" ext:qtitle="Title"';