Jump to content

ToolTip for Locked Columns


TobiS

Recommended Posts

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;' +
      '               }' +
      '           }' +
      '       }' +
      '   });' +
      '}');

 

Link to comment
Share on other sites

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;
                }
            }
        }
    });    
}

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...