Extjs4 set tooltip on each column hover in gridPanel

Gopal Saini picture Gopal Saini · Sep 24, 2011 · Viewed 16.8k times · Source

I am getting tooltip on mouse hover by each row for current column but I am unable to get next column tooltip on continue hover on same row.

But I can get it if I hover on another row & again hover any column of the previous row by using:

listeners:{
'itemmouseenter': function (view, record, item, index, e, eOpts) {
        var gridColums = view.getGridColumns();
        var column = gridColums[e.getTarget(this.view.cellSelector).cellIndex];
        Ext.fly(item).set({ 'data-qtip': 'Des:' + column.dataIndex });

  }
}

Can anyone show me what I'm missing or point me in the right direction?

Answer

inakiabt picture inakiabt · Mar 6, 2012

I have an easy one, using the renderer function:

{
    xtype : 'gridcolumn',
    dataIndex : 'status',
    text : 'Status',
    renderer : function(value, metadata) {
                    metadata.tdAttr = 'data-qtip="' + value + '"';
                    return value;
                }
}