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

Skipping over parent node

1 Answer 19 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Bill
Top achievements
Rank 2
Bill asked on 27 Aug 2010, 07:07 PM
I am traversing a treenode and wish to skip over a parent node (which I know the forecolor is blue). Here is my code. The below code simply traverses the nodes from one to the next regardless of being a parent or not.

RadTreeNode

 

currentNode = RadTreeView1.SelectedNode;

 

 

if (currentNode.Next != null)

 

currentNode.Next.Selected =

true;

 

 

else if (currentNode.ParentNode != null)

 

{

 

if (currentNode.ParentNode.Next != null)

 

currentNode.ParentNode.Next.Selected =

true;

 

}


How can I accomplish this?

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 30 Aug 2010, 02:48 PM
Hello William,


One suggestion is iterating through the nodes until node Level reaches "0" which means root nodes.


Thanks,
Princy.
Tags
TreeView
Asked by
Bill
Top achievements
Rank 2
Answers by
Princy
Top achievements
Rank 2
Share this question
or