Skipping over parent node

2 posts, 0 answers
  1. Bill
    Bill avatar
    175 posts
    Member since:
    Apr 2010

    Posted 27 Aug 2010 Link to this post

    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?
  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 30 Aug 2010 Link to this post

    Hello William,


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


    Thanks,
    Princy.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top