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

Automatically Create Hierarchy from Item Data

1 Answer 61 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Mike
Top achievements
Rank 1
Mike asked on 02 Mar 2012, 12:51 AM
Hello,

I'm trying to bind a treeview to a list(of CustomClass) where the custom class has "StartTime" and "Group" properties.

Is there some way I could group (into a node hierarchy) by the date parts of the start time? So, at the top level would be "StartTime.Date", that would expand to show all values of "StartTime.Time" for that Date, then those would expand to show all values of "Group" for that start date and time - that kind of thing?

Thanks,

Mike

1 Answer, 1 is accepted

Sort by
0
Bozhidar
Telerik team
answered on 06 Mar 2012, 11:37 AM
Hello Mike,

You can go through all the items in the list and create the TreeView programmatically. I've attached a small sample page demonstrating the approach.
 
Regards,
Bozhidar
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
TreeView
Asked by
Mike
Top achievements
Rank 1
Answers by
Bozhidar
Telerik team
Share this question
or