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

Binding to entity with Children

1 Answer 20 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Andrew
Top achievements
Rank 1
Andrew asked on 03 Aug 2010, 06:57 AM
Hello guys. I get data for tree from wcf by dto
[DataContract]
[Serializable]
 public class FileHandlerDTO
{
        [DataMember]
        public int Id { get; set; }
        [DataMember]
        public string Name { get; set; }
        [DataMember]
        public string Description { get; set; }
        [DataMember]
        public List<FileHandlerDTO> Children;
}
How can i bind this object to TreeView. At your samples I've seen only through parentId. Your SL analogue of treeview work with such domains well.

1 Answer, 1 is accepted

Sort by
0
T. Tsonev
Telerik team
answered on 06 Aug 2010, 10:39 AM
Hello Andrew,

You can't bind to such graph of objects directly with the ASP.NET version of RadTreeView. No standard ASP.NET control can do this as well.

What you need here is a hierarchical ObjectDataSource which is not available as part of  ASP.NET. There's an open source project that offers an implementation - Object Hierarchical Data Source

That's what we recommend to use in this case. I hope this helps.

Greetings,
Tsvetomir Tsonev
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
Andrew
Top achievements
Rank 1
Answers by
T. Tsonev
Telerik team
Share this question
or