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

Refresh NodeText with usercontrol value

3 Answers 63 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Dominic
Top achievements
Rank 2
Dominic asked on 03 Nov 2008, 01:41 PM
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.

3 Answers, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 03 Nov 2008, 02:21 PM
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.
0
Dominic
Top achievements
Rank 2
answered on 03 Nov 2008, 02:31 PM
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
0
Accepted
Yana
Telerik team
answered on 06 Nov 2008, 11:28 AM
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.
Tags
TreeView
Asked by
Dominic
Top achievements
Rank 2
Answers by
Peter
Telerik team
Dominic
Top achievements
Rank 2
Yana
Telerik team
Share this question
or