Sharing Columns across children in HierarchyChildTemplate

4 posts, 0 answers
  1. Bobby
    Bobby avatar
    6 posts
    Member since:
    Jun 2014

    Posted 03 Sep 2014 Link to this post

    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
  2. Boris
    Admin
    Boris avatar
    276 posts

    Posted 08 Sep 2014 Link to this post

    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.
     
  3. Bobby
    Bobby avatar
    6 posts
    Member since:
    Jun 2014

    Posted 08 Sep 2014 in reply to Boris Link to this post

    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
  4. Boris
    Admin
    Boris avatar
    276 posts

    Posted 11 Sep 2014 Link to this post

    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.
     
Back to Top