I have had a problem with locked columns, because headerCt is moved into "sub grids" on locking. See my fixed version:
Code:
/**
* @class Ext.ux.grid.HeaderToolTip
* @namespace ux.grid
*
* Text tooltips should be stored in the grid column definition
*
* Sencha forum url:
* http://www.sencha.com/forum/showthread.php?132637-Ext.ux.grid.HeaderToolTip
*/
Ext.define('Ext.ux.grid.HeaderToolTip', {
alias: 'plugin.headertooltip',
init : function(grid){
if( grid.headerCt ) {
this.initColumnHeaders( grid.headerCt, grid );
} else if( grid.lockable ){
this.initColumnHeaders( grid.lockedGrid.headerCt, grid );
this.initColumnHeaders( grid.normalGrid.headerCt, grid );
}
},
initColumnHeaders: function( headerCt, grid ) {
headerCt.on("afterrender", function(g) {
grid.tip = Ext.create('Ext.tip.ToolTip', {
target: headerCt.el,
delegate: ".x-column-header",
trackMouse: true,
renderTo: Ext.getBody(),
listeners: {
beforeshow: function(tip) {
var c = headerCt.down('gridcolumn[id=' + tip.triggerElement.id +']');
if (c && c.tooltip) {
tip.update(c.tooltip);
} else {
tip.clearTimers();
return false;
}
}
}
});
});
}
});
... works with 4.0.7, with 4.1.1 it isn't working because of missing clone() method. has anybody a workaround for that?