PDA

View Full Version : How to set target position of expander icon to display tooltip message?



Santra
22 May 2015, 1:47 AM
Hi,

I'm working on displaying tooltip message on hover of expander icon.

I tried the below code.But the tooltip is displaying all over the grid data. Need to set the target position of expander icon '+'.

PFB the sample code.



// Adding tooltip var view = grid.getView();
grid.tip = Ext.create('Ext.tip.ToolTip', {
target: view.el,
delegate: view.itemSelector,
trackMouse: true,
renderTo: Ext.getBody(),
listeners: {
beforeshow: function updateTipBody(tip) {
tip.update('Show all details of "' + view.getRecord(tip.triggerElement).get('empId') + '"');
}
}
});

// creating panel

var createGrid = function(columndata,isMultipleD2) {
grid = Ext.create('Ext.grid.Panel', {

plugins: [{ ptype: 'rowexpander',
pluginId: 'expander',
width : '20px',
rowBodyTpl : [
]
}],
});

};




waiting for the right solution.
Thanks in advance.

f.baron
22 May 2015, 4:08 AM
Try adding


delegate: '.x-grid-row-expander'

to the Tooltip config