Databinding with TreeListView

2 posts, 0 answers
  1. Nitin Koka
    Nitin Koka avatar
    3 posts
    Member since:
    Oct 2009

    Posted 15 Jan 2010 Link to this post


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


  2. Tihomir Petkov
    Tihomir Petkov avatar
    576 posts

    Posted 18 Jan 2010 Link to this post

    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.

    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.
Back to Top