This is a migrated thread and some comments may be shown as answers.

Hiding ToolTip on GridViewColumn

1 Answer 96 Views
GridView
This is a migrated thread and some comments may be shown as answers.
YK
Top achievements
Rank 1
YK asked on 17 Nov 2011, 10:01 PM
Hi,
I have a problem hiding tooltip on the cell, so I thought that maybe someone already had this problem and could help. I generate the datagrid dynamically in the code behind(I get binding strings from a service call for the columns) and some of the columns have tooltips. I use the ToolTipTemplate property on the column to assign the tooltip. I generate the tooltips for the columns on the fly by calling a method which returns the following

return

 

 

(DataTemplate)XamlReader.Load(@"<DataTemplate xmlns=""http://schemas.microsoft.com/client/2007"">

 

<TextBlock Text=""{Binding "

 

 

+ toolTip + @"}"" TextWrapping=""Wrap"" MaxWidth=""200""/>

 

</DataTemplate>"

 

 

);
Everything works fine till here. But the problem comes when there is no value present and an empty tooltip is displayed for the cells (in the column) which doesnt have a string value to show.
How can I hide this empty tooltip and show the tooltip when there is value to show?
Thanks in advance
YK

 

1 Answer, 1 is accepted

Sort by
0
Maya
Telerik team
answered on 18 Nov 2011, 07:46 AM
Hi,

Please take a look at the following forum thread for a reference.
 

All the best,
Maya
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
GridView
Asked by
YK
Top achievements
Rank 1
Answers by
Maya
Telerik team
Share this question
or