TobiS Posted October 8, 2020 Share Posted October 8, 2020 Hi, is there a way to show the tooltip for locked Columns? i use this script in the UniFormCreate to add tooltips. ClientEvents.ExtEvents.Add('viewready=function viewready(sender, eOpts)' + '{' + ' sender.view.tip = Ext.create(''Ext.tip.ToolTip'', {' + ' target: sender.view.el,' + ' delegate: sender.view.cellSelector,' + ' trackMouse: true,' + ' renderTo: Ext.getBody(),' + ' listeners: {' + ' beforeshow: function updateTipBody(tip) {' + ' gridColums = sender.view.getGridColumns();' + ' column = gridColums[tip.triggerElement.cellIndex];' + ' record = sender.view.getRecord(tip.triggerElement.parentNode);' + ' if (column.dataIndex>0) {' + ' tip.update("<span class=\"SUHint\">"+record.data[1])+"</span>";' + ' } else {' + ' return false;' + ' }' + ' }' + ' }' + ' });' + '}'); Quote Link to comment Share on other sites More sharing options...
Sherzod Posted October 11, 2020 Share Posted October 11, 2020 On 10/8/2020 at 7:16 PM, TobiS said: is there a way to show the tooltip for locked Columns? Hello, Try this "event" too: function afterrender(sender, eOpts) { sender.view.tip2 = Ext.create('Ext.tip.ToolTip', { target: sender.lockedGrid.view.el, delegate: sender.view.cellSelector, trackMouse: true, renderTo: Ext.getBody(), listeners: { beforeshow: function updateTipBody(tip) { gridColums = sender.view.getGridColumns(); column = gridColums[tip.triggerElement.cellIndex]; record = sender.view.getRecord(tip.triggerElement.parentNode); if (column.dataIndex > 0) { tip.update("<span class=\"SUHint\">" + record.data[1]) + "</span>"; } else { return false; } } } }); } Quote Link to comment Share on other sites More sharing options...
TobiS Posted October 12, 2020 Author Share Posted October 12, 2020 this works really well! Sadly it shows the tooltip now in every column. Can i change that to one specific one? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted October 12, 2020 Share Posted October 12, 2020 2 minutes ago, TobiS said: Sadly it shows the tooltip now in every column. Can i change that to one specific one? 16 hours ago, Sherzod said: if (column.dataIndex > 0) { ? Quote Link to comment Share on other sites More sharing options...
TobiS Posted October 12, 2020 Author Share Posted October 12, 2020 i know i changed ot to "=3" still shows in every column Quote Link to comment Share on other sites More sharing options...
Sherzod Posted October 12, 2020 Share Posted October 12, 2020 Like this?: if (column.dataIndex == 3) { Quote Link to comment Share on other sites More sharing options...
TobiS Posted October 14, 2020 Author Share Posted October 14, 2020 Now that you mention it there is a "=" missing.... Anyway! Thanks for the help works great now! 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.