Build the Hierarchy tree by using Telerik RadTreeView

6 posts, 0 answers
  1. Peter Zhao
    Peter Zhao avatar
    10 posts
    Member since:
    May 2010

    Posted 01 Mar 2011 Link to this post

    Hi Everyone:

     Is it possible to build the Hierarchy tree(horizontal) by using RadTreeView control?
    Samething like the picture below.


    Thanks,
    Peter
  2. Tina Stancheva
    Admin
    Tina Stancheva avatar
    3298 posts

    Posted 03 Mar 2011 Link to this post

    Hi Peter Zhao,

    You can modify the default ControlTemplate of the RadTreeViewItem to implement this scenario. You can find more info on how to edit ControlTemplates in Blend here. Currently the RadTreeViewItem Template Structure contains a Grid RootElement, which represents the layout root for the template. It defines two rows - in the first one is the ContentPresenter and in the second one is the ItemsPresenter for the child items. So if you change the rows to columns, you will be able to get the desired look.

    I attached a sample project to get you started.

    Greetings,
    Tina Stancheva
    the Telerik team
    Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
  3. DevCraft banner
  4. Peter Zhao
    Peter Zhao avatar
    10 posts
    Member since:
    May 2010

    Posted 03 Mar 2011 Link to this post

    Thanks. I will have a look.
  5. Peter Zhao
    Peter Zhao avatar
    10 posts
    Member since:
    May 2010

    Posted 03 Mar 2011 Link to this post

    Hi Tina:

    I have played with the application that you attached. it looks very nice. just one thing I need to ask you about for the tree, for the first element of each level we have the top edge, it isn't very nice. is there any way we can remove it?That will be very helpful. Please see the attached picture that highlight part.


    Cheers,
    Peter
  6. Tina Stancheva
    Admin
    Tina Stancheva avatar
    3298 posts

    Posted 07 Mar 2011 Link to this post

    Hello Peter Zhao,

    I modified the sample accordingly. Please have a look at it and let me know if this is what you had in mind.

    All the best,
    Tina Stancheva
    the Telerik team
    Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
  7. Peter Zhao
    Peter Zhao avatar
    10 posts
    Member since:
    May 2010

    Posted 07 Mar 2011 Link to this post

    Thanks Tina:

     It looks great. Appreciate your help.


    Regards,
    Peter
Back to Top
DevCraft banner