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

[Solved] recursively creating tree

1 Answer 119 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Ken Payson
Top achievements
Rank 1
Ken Payson asked on 13 Sep 2010, 07:57 PM
In my project, I  have a TaxonomyTeeNode class.  The class has some data members and a list of child nodes.  I want to recurse on the root element of this class and transform it to an MVC Tree.  I can't figure out how to do this.  Please help. 

public Class TaxonomyTreeNode
{
public string CatName { get; set;}
public string CatId { get; set; }
//...some other node properties

public IEnumerable<TaxonomyTreeNode> childCats { get; set; }
}

The root TaxonomyTreeNode is a property of the model





1 Answer, 1 is accepted

Sort by
0
Georgi Krustev
Telerik team
answered on 14 Sep 2010, 08:49 AM
Hello Ken,

I believe that this online example will cover your needs. It shows how to bind treeview UI component to collection like yours.

Greetings,
Georgi Krustev
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
Tags
TreeView
Asked by
Ken Payson
Top achievements
Rank 1
Answers by
Georgi Krustev
Telerik team
Share this question
or