4 Answers, 1 is accepted
0
Accepted
Hello Markus,
Please refer to the following article which demonstrates how you can add a child node programmatically:
Adding and Removing Nodes.
In short, every RadTreeNode has a Nodes collection, so you can add a child node as it is done in the following code snippet:
I hope this helps. If you have additional questions, feel free to contact me.
All the best,
Nikolay
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Please refer to the following article which demonstrates how you can add a child node programmatically:
Adding and Removing Nodes.
In short, every RadTreeNode has a Nodes collection, so you can add a child node as it is done in the following code snippet:
this
.radTreeView1.Nodes[0].Nodes[2].Nodes.Add(
new
RadTreeNode(
"Child node"
));
I hope this helps. If you have additional questions, feel free to contact me.
All the best,
Nikolay
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0

Pierre
Top achievements
Rank 1
answered on 30 Jan 2010, 07:43 PM
Hello Nikolay,
thank you very much - this helps me realy. I have one more problem.. perhaps you have got a good solution for the second one:
I build my treeview with the property builder and some nodes created by code. so - it is posibile to "refresh" one item? I will change some images from a node (created by code (dynamicly) and builder)
? find - delete and create ? or can a change the image on runtime by code?
thanks
Markus
thank you very much - this helps me realy. I have one more problem.. perhaps you have got a good solution for the second one:
I build my treeview with the property builder and some nodes created by code. so - it is posibile to "refresh" one item? I will change some images from a node (created by code (dynamicly) and builder)
? find - delete and create ? or can a change the image on runtime by code?
thanks
Markus
0
Hello Markus,
Thank you for the question.
In order to set an image to a RadTreeNode at runtime, just assign an image object to the RadTreeNode.Image property. I am demonstrating this behavior in the attached sample project. As you will notice, I am using the FindByTextCommand which allows me to easily find a node and set its properties.
I am not sure that I understand the requirement from your last sentence. Could you please provide me with additional details about it?
Kind regards,
Nikolay
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Thank you for the question.
In order to set an image to a RadTreeNode at runtime, just assign an image object to the RadTreeNode.Image property. I am demonstrating this behavior in the attached sample project. As you will notice, I am using the FindByTextCommand which allows me to easily find a node and set its properties.
I am not sure that I understand the requirement from your last sentence. Could you please provide me with additional details about it?
Kind regards,
Nikolay
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Hi Markus,
Stefan
the Telerik team
Please note that in Q1 2011 we have introduced a major upgrade of RadTreeView control, which is now virtualized and fully customizable. Feel free to download the latest release and try it out.
For more information about this release, please refer to this blog post.
Stefan
the Telerik team