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

Different format for Parent and Child elements in RadTreeListView

1 Answer 120 Views
TreeListView
This is a migrated thread and some comments may be shown as answers.
Kalaivanan
Top achievements
Rank 1
Kalaivanan asked on 01 Apr 2016, 12:39 PM

Hi,

I am new to silver-light and Telerik Rad controls, i have a scenario to display data in the form of tree hierarchy, this data hierarchy contains only two levels(Parents and Child's), but i want to display Parents and Child's in different style(see below sample or attachment), please help me to achieve this.

Data Hierarchy

Name     Option 1     Option 2      Option 3
Parent-1
   Child-1     1                  2                 3
   Child-2     1                  2                 3 
   Child-3     1                  2                 3 
   Child-4     1                  2                 3 
   Child-5     1                  2                 3 
Parent-2
   Child-6     1                  2                 3  
   Child-7     1                  2                 3  
   Child-8     1                  2                 3  
   Child-9     1                  2                 3  
   Child-10   1                  2                 3  

My advance thanks for your responses.

Thanks,
Kalaivanan.

1 Answer, 1 is accepted

Sort by
0
Dilyan Traykov
Telerik team
answered on 06 Apr 2016, 09:15 AM
Hello Kalaivanan,

Could you please clarify whether the child elements should have a different style or different fields. Or maybe both?

From the image and table you've provided, I can assume that your hierarchy is of heterogeneous data. As stated in the RadTreeListView vs RadGridView section of RadTreeListView's Getting Started article, you should use RadTreeListView only when you need to display homogeneous data. For heterogeneous data, you should use a Hierarchical RadGridView.

If you need your children to have a different style from their parent, you can then modify RadGridView's HierarchyChildTemplate to your liking.

Please let me know if you find this information helpful.

Regards,
Dilyan Traykov
Telerik
Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
Tags
TreeListView
Asked by
Kalaivanan
Top achievements
Rank 1
Answers by
Dilyan Traykov
Telerik team
Share this question
or