We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

EJ2 Grid Inline Edit Mode, ToolTip get stuck when editing

Hello

I am using EJ 2 version 16.3.0.36 (nuget package).

I have a grid that displays a ToolTip for every column, it uses the Inline edit mode. When double clicking a row, the edit mode is activated. However, because the mouse hovered over the row, the tooltip is shown. As a result, the edit mode is now active but the ToolTip stays shown.

Now even when exiting the edit mode (cancel/save) the ToolTip stays shown.
When hovering over different columns, additional ToolTips are shown, but the one that was shown when double clicking is still present.

How can I remove the ToolTip that is stuck?


Kind regards
Phil

5 Replies

MS Madhu Sudhanan P Syncfusion Team December 10, 2018 06:03 AM UTC

Hi Phil, 

Thanks for contacting Syncfusion support. 

To resolve this problem we need to destroy the tooltip before edit begin using the actionBegin event as follows. 


<ejs-grid id="GridOverview" actionBegin="actionBegin"> 
    ...... 
</ejs-grid> 
 
<script> 
    function actionBegin(args) { 
        if (args.requestType === 'beginEdit') { 
            var tooltips = args.row.querySelectorAll('.e-tooltip'); 
            for (var i = 0; i < tooltips.length; i++) { 
                tooltips[i].ej2_instances[0].destroy(); 
            } 
        } 
    } 
</script> 


Regards, 
Madhu Sudhanan P 



UN Unknown December 10, 2018 08:53 AM UTC

This works fine, thank you a lot.

However, I noticed that after exiting the edit mode (through cancel or update) a (as it seems) random column gets an unwanted ToolTip.
It disappears when clicking anywhere on the website.




MS Madhu Sudhanan P Syncfusion Team December 11, 2018 05:45 AM UTC

Hi Phil, 

Thanks for the update. 

To resolve this set the openOn property of the tooltip as Hover as follows. 


<script> 
 
function tooltip(args) { // event triggers on every cell render. 
    var tooltip = new ej.popups.Tooltip({ 
        content: args.data[args.column.field].toString(), 
        opensOn: 'Hover'  // add Essential JS2 tooltip for every cell. 
    },args.cell); 
} 
</script> 



Regards, 
Madhu Sudhanan P 



UN Unknown December 11, 2018 07:54 AM UTC

Now it works perfectly.

Thank you a lot.


MS Madhu Sudhanan P Syncfusion Team December 11, 2018 08:50 AM UTC

Hi Phil, 
Thanks for the update. Please get back to us if you need further assistance. 
Regards, 
Madhu 


Loader.
Up arrow icon