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

Hide group indentation for groups with one items

1 Answer 171 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Perlom
Top achievements
Rank 1
Perlom asked on 19 Mar 2013, 05:21 PM

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!


Thanks!

1 Answer, 1 is accepted

Sort by
0
Pavel Pavlov
Telerik team
answered on 22 Mar 2013, 12:49 PM
Hello,

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.

Tags
GridView
Asked by
Perlom
Top achievements
Rank 1
Answers by
Pavel Pavlov
Telerik team
Share this question
or