Hide group indentation for groups with one items

2 posts, 0 answers
  1. Perlom
    Perlom avatar
    5 posts
    Member since:
    Nov 2012

    Posted 19 Mar 2013 Link to this post

    Hi all,

    I am using a grid view in our WPF application, the grid is bound to a data model that has two properties called “Class” and “SubClass” along with few other properties (price, year, etc…).  The grid has 2 group descriptors for those properties (Class is the parent group, and SubClass is sub-group). Each group and subgroup has a custom styled footer row that displays an aggregate total of prices.

    What we are trying to achieve is that when a sub-group has only one item, it should not be indented, we want to appear in the same level as the parent group.  Also, there should be no footer total displayed for that group (since the total is just the same as the item price, no need to show the same figure twice). How can I achieve those 2 behaviors?

    I tried to using the GroupFooterRowStyleSelector, and have 2 styles for the group footer, one for Visible and one for Hidden states.  And detect if row.Group.ItemCount is 1, then set the GridViewGroupFooterRow visibility to collapsed.  But that resulted on the Aggregate function are still being shown.

    Any help would be appreciated!

  2. Pavel Pavlov
    Pavel Pavlov avatar
    2039 posts

    Posted 22 Mar 2013 Link to this post


    I am afraid RadGridView does not support such behavior. Group indents are part of the whole layout logic and scrolling and cover more than just the group rows e.g. headers , scrolling etc. Even if you manage to change the visual appearance there are some side effects expected.

    All the best,
    Pavel Pavlov
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Back to Top