I need to show data in a tree view

3 posts, 0 answers
  1. KinG
    KinG avatar
    6 posts
    Member since:
    Aug 2008

    Posted 26 Feb 2019 Link to this post

    Hello ,


    Can you please advise how the Tree view should be setup to give this type of functionality with database table attached ?



  2. Vessy
    Vessy avatar
    2093 posts

    Posted 28 Feb 2019 Link to this post

    Hi KinG,

    The provided data-table does not have a ParentId column, so the TreeView can be bound only with first-level nodes in a similar way:
    <telerik:RadTreeView ID="RadTreeView1" runat="server" DataFieldID="id" DataTextField="Description" DataValueField="Title"></telerik:RadTreeView>

    If you want to group the data (e.g. by department code or name) you will need to aggregate your data and add an "ParentID" column that will hold the data determining the hierarchy of the nodes. You can find detailed information about the specifics on binding RadTreeView to a database here:

    The following demo also represents a very simple demo for such setup so I will advise you to review it: 

    Progress Telerik
    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
  3. KinG
    KinG avatar
    6 posts
    Member since:
    Aug 2008

    Posted 03 Mar 2019 Link to this post

    thank you for support
Back to Top