I found 2 ways to do this:
1. For a particular grid column, describe a renderer, for example:
{ width: 200, dataIndex : 'invoice', renderer:addTooltip }
And your rendering function:
function addTooltip(value, metadata){ metadata.attr = 'ext:qtip="' + value + '"'; return value; }
But this method will only work when the mouse pointer is above the specified column.
2. For "rendering" the grid events apply / use this function:
var myGrid = grid; myGrid.on('render', function() { myGrid.tip = new Ext.ToolTip({ view: myGrid.getView(), target: myGrid.getView().mainBody, delegate: '.x-grid3-row', trackMouse: true, renderTo: document.body, listeners: { beforeshow: function updateTipBody(tip) { tip.body.dom.innerHTML = "Over row " + tip.view.findRowIndex(tip.triggerElement); } } }); });
I hope this will be useful for you :)
source share