Edit this page

Traversing Nodes

To traverse Nodes, iterate the Nodes collection of the TreeView or Nodes collection of a Node. Each member of the collection will be of RadTreeNode type that will allow access to Text, Value and other properties. Use the GetAllNodes() method to return Nodes from the entire Tree at one time.

foreach (RadTreeNode node in RadTreeView1.Nodes)
{
   tbResults.Text += node.Text + System.Environment.NewLine;
}
foreach (RadTreeNode node in RadTreeView1.GetAllNodes())
{
   tbResults.Text += node.Text + System.Environment.NewLine;
}       
For Each node As RadTreeNode In RadTreeView1.Nodes
 tbResults.Text += node.Text + System.Environment.NewLine
Next
For Each node As RadTreeNode In RadTreeView1.GetAllNodes()
 tbResults.Text += node.Text + System.Environment.NewLine
Next        
Is this article helpful? No Yes
Thank you for your feedback!

Give article feedback

Tell us how we can improve this article

close
Dummy