Tooltip while loading from LoadXml method in TreeView

2 posts, 0 answers
  1. Avik
    Avik avatar
    32 posts
    Member since:
    Jun 2008

    Posted 24 Apr 2009 Link to this post


    I am populating a Treeview from a xmlstring by the method LoadXml.
    It is giving me no problem in loading.
    Now I want to have tooltip for each of the node of the treeview. I have the required data in the xml string as attributes.
    I'm finding no way to get the tooltip shown.

    Can you please tell me how to do that?
    Thans in advance.

  2. Veselin Vasilev
    Veselin Vasilev avatar
    2992 posts

    Posted 24 Apr 2009 Link to this post

    Hello Avik,

    Just name the attribute ToolTip:

            StringBuilder sb = new StringBuilder();  
            sb.Append(" <Node Text='Root Node 1' ToolTip='my tooltip'>");  
            sb.Append(" </Node>");  
            sb.Append(" <Node Text='Root Node 2'>");  
            sb.Append(" </Node>");  
            sb.Append(" <Node Text='Root Node 3'>");  
            sb.Append(" <Node Text='Child Node'>");  
            sb.Append(" </Node>");  
            sb.Append(" </Node>");  
            sb.Append(" </Tree>");  
            string xmlString = sb.ToString();  

    Now the tooltip will be shown automatically.

    Veselin Vasilev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
Back to Top