Refresh NodeText with usercontrol value

4 posts, 1 answers
  1. Dominic
    Dominic avatar
    42 posts
    Member since:
    Sep 2008

    Posted 03 Nov 2008 Link to this post

    Hi

    In my scenario, i have a treeview in the left side of a RadSplitter and on the other radPane , i load a user control when a node is clicked. My problem is that when i enter a value in a textbox includes in my usercontrol on the right pane, i want to update the associated radTreeNode.text with the associated text in my user control's textbox. I'm not sure how i can achieve that thing, so any help would be appreciated.

    If you need more details on that, please let me know.

    Thanks in advance for your helps.

  2. Peter
    Admin
    Peter avatar
    6637 posts

    Posted 03 Nov 2008 Link to this post

    Hello Dominic,

    When you click on a treeview node, it becomes selected and you can use the SelectedNode property to access it. For example:

      protected void Button1_Click(object sender, EventArgs e)  
        {  
            if(RadTreeView1.SelectedNode != null)  
                Response.Write(RadTreeView1.SelectedNode.Text);  
        } 



    Kind regards,
    Peter
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  3. Dominic
    Dominic avatar
    42 posts
    Member since:
    Sep 2008

    Posted 03 Nov 2008 Link to this post

    Hi

    Thanks for your answer.
     
    Maybe my last post was not very clear. My problem is not to update the text on the NodeSelected server event. I have a usercontrol on the right side of my RadSpliter and in this usercontrol i have a textbox, i want to update the node text with the text insert in this textbox when the user exit this usercontrol or click on another node after he have inserted something in the textbox.

    Thanks
  4. Answer
    Yana
    Admin
    Yana avatar
    4813 posts

    Posted 06 Nov 2008 Link to this post

    Hi Dominic,

    Please check the attached sample project which shows the needed approach. Download it and give it a try.

    Regards,
    Yana
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Back to Top