This the XAML I am using - am I doing something wrong or does it just not work? The property setters seem to have no effect.
<Window x:Class="GridViewTest.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Height="350" Width="525"
xmlns:t="http://schemas.telerik.com/2008/xaml/presentation">
<Window.Resources>
<Style TargetType="t:GroupHeaderRow">
<Setter Property="ShowGroupHeaderColumnAggregates" Value="True" />
<Setter Property="ShowHeaderAggregates" Value="False" />
</Style>
</Window.Resources>
<Grid>
<t:RadGridView ItemsSource="{Binding Path=Records}" SelectionMode="Extended">
<t:RadGridView.GroupDescriptors>
<t:GroupDescriptor Member="Column1" SortDirection="Ascending">
<t:GroupDescriptor.AggregateFunctions>
<t:CountFunction Caption="Entries count: " />
<t:FirstFunction Caption="First entry: " />
</t:GroupDescriptor.AggregateFunctions>
</t:GroupDescriptor>
</t:RadGridView.GroupDescriptors>
</t:RadGridView>
</Grid>
8 Answers, 1 is accepted
You need to set RadGridView's GroupRenderMode to Flat and define your aggregate functions on column level. Please check this online demo for a reference. The same example is available in your local copy of WPF demos.
I hope this helps.
Regards,
Yoan
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

However its not really what I wanted, what I would like to do is have aggregate values in line but aligned with the columns. Basically just like you get in other grids, excel pivots etc.
It seems to me that you either have aggregates in an additional row and an unnecessary group header or you have them in the group header but messily unaligned and unreadable?
Is this at all possible, without this standard grouping behavior I will be looking to use another grid?
I understand what you mean. Regarding alignment of the group aggregates, I would suggest you to check the workaround suggested in the Group aggregate row header alignment forum thread. Still, we would recommend the built-in option explained by my colleague although it is indeed not exactly what you wish to have.
Regards,
Dimitrina
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

Generally speaking, the approach of implementing such customization would be the basically same. You just need to remove the CompositeTransform from the template of the control and use one of the available mechanisms in WPF, as the CompositeTransform is present in Silverlight only. However, the presented solution is a customization which may not work as expected in all scenarios. Can you please clarify whether the built-in ShowGroupHeaderColumnAggregates property of the GroupHeaderRow is not an option for you?
Best Regards,
Stefan X1
Telerik by Progress

I've got this working in WPF now, but unfortunately it is not the answer. The first aggregation goes into the header row as required, but all subsequent aggregations are placed on a footer row.
Unfortunately ShowGroupHeaderColumnAggregates is no good either. This creates a new row for each grouping, which produces twice as many rows as necessary.
If anyone can tell me how to have aggregation in the same line as the grouping, in columns, then I would be very grateful. If I can't get this working I will have to continue using Component One which would be a shame.
Thanks for the update.
By the time being, there is no out-of-the-box mechanism for achieving such visual appearance. The only solution would be to modify the default template of the GridViewHeaderRow element(If you are using Flat GroupRenderMode. If you are using the older and default Nested one, the element would be GridViewGroupRow).
However, as we already have demand for providing a built-in mechanism for achieving this, we have logged it as a feature request. I will now raise its priority and we will try to provide it as soon as possible. You can track the state of the relevant item in the Feedback Portal: Implement the possibility to align the HeaderAggregates with the columns.
If further assistance is needed, feel free to approach me.
All the best,
Stefan X1
Progress Telerik
Currently, we are exploring an idea for arranging the column group aggregates in a way that aligns them to the original columns that define them. It seems that the best option in terms of visual presentation is to make the group row a bit higher. Such change will be needed to prevent the first 1-2 columns' aggregates from overlapping with the group key (especially for groups with deeper level of nesting). It will be applied only when column aggregates are present and the new and the old behavior will be switchable by a property. The aggregates that are applied on group level (group descriptor), which are not associated with a particular column will still be listed on the right side of the group key. Can you please have a look at the attached picture which illustrates the idea (with 3 levels of grouping) and confirm whether such a behavior meets your requirements?
Regards,
Ivan Ivanov
Progress Telerik