How to structure this data?

2 posts, 0 answers
  1. Najid Hanif
    Najid Hanif avatar
    92 posts
    Member since:
    Jul 2011

    Posted 06 May 2012 Link to this post

    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!
  2. Bozhidar
    Admin
    Bozhidar avatar
    1101 posts

    Posted 07 May 2012 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top