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

Sharing Columns across children in HierarchyChildTemplate

3 Answers 51 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Bobby
Top achievements
Rank 1
Bobby asked on 03 Sep 2014, 08:48 PM
I have a RadGridView that contains a HierarchyChildTemplate creating another RadGridView for each item in my collection. The collection is of ClassA objects and ClassA contains a collection of ClassB objects and an identifier. I would like to share columns across all the children RadGridViews. ClassA is essentially a grouping of ClassB objects where I can perform some validation among other things. This is what I would like the grid to look like 

+ Instance of Class A
    b.A     b.B       b.C
    b.A     b.B       b.C
+ Instance of Class A
    b.A     b.B       b.C
    b.A     b.B       b.C

A treelistview almost does what I want but my tree is only one level deep and I would need a way to style the root parent row differently. I was hoping you might have some suggestions for how I can accomplish this. Thank you

3 Answers, 1 is accepted

Sort by
0
Boris
Telerik team
answered on 08 Sep 2014, 02:06 PM
Hello Bobby,

In general, when your hierarchy is only one level deep we can recommend using RowDetails to represent your data. That will allow you to style the parent row and the RowDetails differently. However, you will not be able to display your data as it is displayed in the TreeListView control, if that is what you meant by "share columns across all the children RadGridViews". 

For more practical examples you can check the RowDetails WPF / Silverlight demo or browse our SDK examples with our SDK Sample Browser. As for the styling part of your question, you look into the Style a RowSetting a Theme (Using Implicit Styles) and Editing Control Templates documentation articles.

I hope this helps.

Regards,
Boris Penev
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
0
Bobby
Top achievements
Rank 1
answered on 08 Sep 2014, 09:42 PM
Thanks for the reply Boris.
I would like to have all the RowDetails share same columns. This would allow me to filter based on the rowdetails similar to the TreeListView. It looks like this isn't supported though
0
Boris
Telerik team
answered on 11 Sep 2014, 04:41 PM
Hello Bobby,

My apologies for the inconvenience caused. It seams that I have misunderstood what you have in mind. 

I attached a sample project that demonstrates how you can style the root parent row in TreeListView, by using a RowStyleSelector.

Please examine the example and let us know if that is what you have in mind.

Regards,
Boris Penev
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
Tags
GridView
Asked by
Bobby
Top achievements
Rank 1
Answers by
Boris
Telerik team
Bobby
Top achievements
Rank 1
Share this question
or