Hiding ToolTip on GridViewColumn

2 posts, 0 answers
  1. YK
    YK avatar
    6 posts
    Member since:
    Nov 2011

    Posted 17 Nov 2011 Link to this post

    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




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


    <TextBlock Text=""{Binding "



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





    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


  2. Maya
    Maya avatar
    4062 posts

    Posted 18 Nov 2011 Link to this post


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

    All the best,
    the Telerik team

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

Back to Top