HierarchicalDataTemplate in RadTreeListView

4 posts, 0 answers
  1. Arinto
    Arinto avatar
    25 posts
    Member since:
    Nov 2010

    Posted 25 Feb 2011 Link to this post

    Hi there, 

    Is it possible to use HierarchicalDataTemplate in RadTreeListView? 
    Here is the reason for my question above:

    I have object structure as shown below:
    1. Class A, it has collection of object of type Class B as one of its properties (in the hierarchy, object of type Class B will be Class A object's children)
    2. Class B's has collection of object of type Class A as one of its properties and so on.(in the hierarchy, object of type Class A will be Class B object's children)

    I notice that in order to use RadTreeListView, parent and children must be in the same type.
    This scenario can be achieved using TreeView with two HierarchicalDataTemplate, but the requirement from customer needs column for each node in the tree view (like what RadTreeListView offers). So I'm thinking if we can use HierarchicalDataTemplate in RadTreeListView than we can solve the problem here.

    Regards,

    arinto

  2. Pavel Pavlov
    Admin
    Pavel Pavlov avatar
    2039 posts

    Posted 25 Feb 2011 Link to this post

    Hello Arinto,

    You say you have objects of different types. However RadTreeListView is build in such manner the items in different levels of hierarchy share the same columns. This means even  different types, to be displayed in RadTreeListView , the must have matching properties.

    If this matches your scenario, we can think of some workaround.

    To be able to further help you , I will need some details on your business objects. Can you please give me the implementation of both the root level and the child level objects. In case there is a way to display them in RadTreeListView I will give you a sample project with the implementation in return.

    Best wishes,
    Pavel Pavlov
    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. UI for WPF is Visual Studio 2017 Ready
  4. Arinto
    Arinto avatar
    25 posts
    Member since:
    Nov 2010

    Posted 27 Feb 2011 Link to this post

    Hi Pavel, 

    Thanks for your prompt reply.
    Here is the sample of business object

    Regards, 

    Arinto
  5. Vlad
    Admin
    Vlad avatar
    11100 posts

    Posted 04 Mar 2011 Link to this post

    Hi,

     With this structure you can bind to collection of ParentClass and show only PropertyBool1, PropertyString1 and PropertyEnum1 columns in both parent and child levels. 

    Best wishes,
    Vlad
    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!
Back to Top