Dropdowntree specific node selection

2 posts, 0 answers
  1. Santosh
    Santosh avatar
    5 posts
    Member since:
    May 2014

    Posted 19 May 2014 Link to this post

    Hi, I am writing the statement like,
     int value=Convert.ToInt32(objRadDropDowmTree.EmbadedTree.Nodes[1].Value);

    But its showing an error "Input string was not correct"
     Please tell me, how to access any specific node value? 

    Please also help me, how to assign tooltip in RadDropDowmTree Nodes .
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 20 May 2014 in reply to Santosh Link to this post

    Hi Santosh,

    Try to attach the OnNodeDataBound event of RadDropDownTree to assign ToolTip for each nodes as follows.

    C#:
    protected void RadDropDownTree1_NodeDataBound(object sender, DropDownTreeNodeDataBoundEventArguments e)
    {
        foreach (RadTreeNode node in RadDropDownTree1.EmbeddedTree.Nodes)
        {
            node.ToolTip = node.Text;
            foreach (RadTreeNode subnode in node.GetAllNodes())
            {
                subnode.ToolTip = subnode.Text;
            }
        }
    }

    Please try the following C# code snippet to access the Specific node of RadDropDownTree.

    C#:
    RadTreeNode node = RadDropDownTree1.EmbeddedTree.Nodes[1];
    string nodeText = node.Text;
    string nodeValue = node.Value;
     
    Let me know if you have any concern.
    Thanks,
    Shinu.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top