Searching a TreeView

2 posts, 0 answers
  1. Christian
    Christian avatar
    81 posts
    Member since:
    Aug 2008

    Posted 21 Oct 2008 Link to this post

    I would like to look in a complex treeview for a node with a certain name. How can I go through all nodes independently of the level?
    For a reference I would be grateful.
  2. Nick
    Nick avatar
    767 posts

    Posted 21 Oct 2008 Link to this post

    Hi Christian,

    Thank you for your question.

    Please review the following code:

    private void radButton1_Click(object sender, EventArgs e)  
    private void recursiveTreeTraversal(RadTreeNodeCollection levelNodes) {  
                foreach (RadTreeNode node in levelNodes) {  
                     if (node.Text == "something") {   
                         //some code here;  

    Do not hesitate to contact me if you have further questions.

    Sincerely yours,
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Back to Top