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!