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

radTreeview Looping

8 Answers 346 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Kiran
Top achievements
Rank 1
Kiran asked on 08 Dec 2009, 10:12 AM
Hi All,

I am facing a problem while looping through the radtreeview.

My radtreeview structure is as below:

folder A
     folder B
             folder C
Folder D
      Folder E
             Folder F
                      Folder G
                              ---------------------N Number of childs
Now i want to loop through the radtreeview,how can i get this? I want some generalised function that will loop through radtreeview.

8 Answers, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 09 Dec 2009, 02:28 PM
Hi Kiran,

 You can use the GetAllNodes() method and a foreach statement:

foreach (RadTreeNode node in RadTreeView1.GetAllNodes())
{

}

Regards,

Atanas Korchev
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
Shiva
Top achievements
Rank 1
answered on 13 Sep 2010, 10:46 AM
Dear Telerik Admin,

Is GetAllNodes() function available in your trial (evaluation) version as well??

Regards,
Shiva
0
Nikolay Tsenkov
Telerik team
answered on 14 Sep 2010, 07:11 AM
Hi Shiva,

Yes, it is! There is no functional difference between the trial and licensed version!
Hope you will enjoy working with our controls!


Regards,
Nikolay Tsenkov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Johnny
Top achievements
Rank 2
answered on 22 Mar 2011, 12:38 PM
Dear Telerik Admin,

Are the 'GetAllnodes' function available for WinForm?

It said 'GetAllNodes' is not a member of 'Telerik.WinControls.UI.RadTreeView'

Im using Q2 2010 Telerik for WinForm with VB.NET 2010
0
Stefan
Telerik team
answered on 24 Mar 2011, 01:00 PM
Hi Johnny,

Thank you for writing.

There is no such method in RadTreeView for WinForms. In order to get all nodes, you should traverse them recursively. Here is an example:
void LoopNodes(RadTreeNodeCollection nodes)
{
    foreach (RadTreeNode node in nodes)
    {
        //do smth with the node
 
        if (node.Nodes.Count > 0)
        {
            LoopNodes(node.Nodes);
        }
    }
}

I hope this helps. Please note that in Q1 2011 we have introduced a fully refactored version of RadTreeView with many improvements and additions. Feel free to download the latest release and try it.

Kind regards,
Stefan
the Telerik team
0
Johnny
Top achievements
Rank 2
answered on 04 Apr 2011, 10:23 AM
Thank for the support. It's working.
0
Stefan
Telerik team
answered on 07 Apr 2011, 08:37 AM
Hi Johnny,

I am glad that I could help. Should you have any other questions, do not hesitate to contact us.
 
Regards,
Stefan
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
sundar
Top achievements
Rank 1
answered on 27 May 2011, 08:21 AM
hello sir i m sundar,

               i am using Q1 2010 version.how Can i get RadTreeList control?

                  thanks in advance
Tags
TreeView
Asked by
Kiran
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Shiva
Top achievements
Rank 1
Nikolay Tsenkov
Telerik team
Johnny
Top achievements
Rank 2
Stefan
Telerik team
sundar
Top achievements
Rank 1
Share this question
or