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
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to prevent the opening of an empty ToolTip when the GridCell is empty?

Platform: WPF |
Control: SfDataGrid |
.NET Framework: 4.5
Tags: tooltip

You can prevent the opening of an empty Tooltip by handling the loaded event of the content loading into the Tooltip template.

Step 1: Consider the TextBlock as the content of the Tooltip. In the following code example, the loaded event of the TextBlock is handled and the parent, Tooltip, is found by using the FindAncestor method. When the TextBlock.Text is empty, then set the ToolTip.IsOpen to false to prevent opening an empty Tooltip.

Step 2: The customized TextBlock is loaded into the Tooltip template of the GridColumn.ToolTipTemplate to achieve the desired result.


Note: You have to set the GridColumn.ShowToolTip to enable ToolTip support as given in the above code.

Sample Link:

WPF: http://www.syncfusion.com/downloads/support/directtrac/138955/WPF1863601731.zip

2X faster development

The ultimate WPF UI toolkit to boost your development speed.
You must log in to leave a comment
Jesse LaVere
Sep 11, 2020

Is this possible to do with the React version of the code?


Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Up arrow icon

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile