This is a migrated thread and some comments may be shown as answers.

HierarchicalDataTemplate in RadTreeListView

3 Answers 197 Views
TreeListView
This is a migrated thread and some comments may be shown as answers.
Arinto
Top achievements
Rank 1
Arinto asked on 25 Feb 2011, 07:45 AM
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

3 Answers, 1 is accepted

Sort by
0
Pavel Pavlov
Telerik team
answered on 25 Feb 2011, 10:47 AM
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!
0
Arinto
Top achievements
Rank 1
answered on 27 Feb 2011, 07:48 AM
Hi Pavel, 

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

Regards, 

Arinto
0
Vlad
Telerik team
answered on 04 Mar 2011, 01:46 PM
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!
Tags
TreeListView
Asked by
Arinto
Top achievements
Rank 1
Answers by
Pavel Pavlov
Telerik team
Arinto
Top achievements
Rank 1
Vlad
Telerik team
Share this question
or