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

How to structure this data?

1 Answer 48 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Najid Hanif
Top achievements
Rank 2
Najid Hanif asked on 07 May 2012, 01:04 AM
I want to create a simple tree view but I can't seem to do it, should be simple?

My data is structured in 1 table like:

ID Name Date
1 Name1 1/5/2012
2 Name2 1/6/2012
3 Name3 1/5/2012     


I want it to be displayed in the treeView like (Date is Root, name is Child)

1/5/2012
----Name1
----Name3
1/6/2012
----Name2

What properties and values do I need to set on the control to achieve this? DataTextField,  DataFieldParentID , etc

Thanks!

1 Answer, 1 is accepted

Sort by
0
Bozhidar
Telerik team
answered on 07 May 2012, 10:41 AM
Hi Andy,

To create the TreeView from such data, you have to do so manually in code behind. A similar scenario is discussed in the following forum topic:
http://www.telerik.com/community/forums/aspnet-ajax/treeview/automatically-create-hierarchy-from-item-data.aspx 
 
Kind 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
Najid Hanif
Top achievements
Rank 2
Answers by
Bozhidar
Telerik team
Share this question
or