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

Databinding with TreeListView

1 Answer 133 Views
TreeListView
This is a migrated thread and some comments may be shown as answers.
Nitin Koka
Top achievements
Rank 1
Nitin Koka asked on 15 Jan 2010, 02:02 PM
Hi,

Can someone please let me know what the record structure should be to use TreeListView to be bound directly to a database.


Thanks

Nitin

1 Answer, 1 is accepted

Sort by
0
Tihomir Petkov
Telerik team
answered on 18 Jan 2010, 02:56 PM
Hello Nitin,

There is no specific requirement for the stucture of the data you want to use in the TreeListView control. However, you are responsible for building the proper hierarchy that will make the data suitable for usage in the UI of your application. In most business scenarios it is not feasible to change the structure of your databases just for the sake of UI and it is usually better and easier to process the data in the ViewModel of your application to make it suitable for rendering (if you are using a design pattern like MVVM).

I am pasting below a link to a blog post that demonstrates how to use a converter to build a hierarchy from a originally flat collection of data. You may find that approach useful.
http://blogs.telerik.com/valerihristov/posts/09-08-26/self-reference_hierarchy_with_telerik_treeview_for_silverlight.aspx

Regards,
Tihomir Petkov
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.
Tags
TreeListView
Asked by
Nitin Koka
Top achievements
Rank 1
Answers by
Tihomir Petkov
Telerik team
Share this question
or