Hi All
I have created a grid based on the examples where the GroupFooterTemplate is used to show sums etc in the footer of each group.
This works fine if I group at runtime, but if I specify the groups at design time, this binding does not seem to be piking up the grouped totals and nothing is show in the GroupFooterTemplate sections.
I need to be able to configure design time grouping as it is crucial to our application.
Please find the xaml I am using below:
I have created a grid based on the examples where the GroupFooterTemplate is used to show sums etc in the footer of each group.
This works fine if I group at runtime, but if I specify the groups at design time, this binding does not seem to be piking up the grouped totals and nothing is show in the GroupFooterTemplate sections.
I need to be able to configure design time grouping as it is crucial to our application.
Please find the xaml I am using below:
<grid:RadGridView x:Name="radGridViewRaw1" ItemsSource="{Binding collectionRaw}" Margin="0" ShowColumnFooters="True" ShowGroupFooters="True" |
AutoGenerateColumns="False" IsReadOnly="True" CanUserFreezeColumns="False"> |
<grid:RadGridView.GroupDescriptors> |
<data:GroupDescriptor Member="PressType" /> |
<data:GroupDescriptor Member="ProcessWeek" /> |
</grid:RadGridView.GroupDescriptors> |
<grid:RadGridView.Columns> |
<grid:GridViewDataColumn Header="Press Type" DataMemberBinding="{Binding PressType}" /> |
<grid:GridViewDataColumn Header="Week" DataMemberBinding="{Binding ProcessWeek}" /> |
<grid:GridViewDataColumn Width="200" Header="Copies Printed" TextAlignment="Right" DataMemberBinding="{Binding CopiesActual}" DataFormatString="{}{0:c}"> |
<grid:GridViewDataColumn.AggregateFunctions> |
<data:SumFunction Caption="Sum: " ResultFormatString="{}{0:c}" SourceField="CopiesActual" /> |
<data:AverageFunction Caption="Average: " ResultFormatString="{}{0:c}" SourceField="CopiesActual" /> |
</grid:GridViewDataColumn.AggregateFunctions> |
<grid:GridViewDataColumn.Footer> |
<StackPanel Orientation="Vertical" Margin="5,0"> |
<TextBlock Text="Custom footer with aggregates:" Margin="0,0,0,2" /> |
<gridView:AggregateResultsList ItemsSource="{Binding}" VerticalAlignment="Center" Grid.Column="4"> |
<ItemsControl.ItemTemplate> |
<DataTemplate> |
<StackPanel Orientation="Horizontal" VerticalAlignment="Center"> |
<TextBlock VerticalAlignment="Center" Text="{Binding Caption}" /> |
<TextBlock VerticalAlignment="Center" Text="{Binding FormattedValue}" /> |
</StackPanel> |
</DataTemplate> |
</ItemsControl.ItemTemplate> |
<ItemsControl.ItemsPanel> |
<ItemsPanelTemplate> |
<StackPanel Orientation="Vertical" /> |
</ItemsPanelTemplate> |
</ItemsControl.ItemsPanel> |
</gridView:AggregateResultsList> |
</StackPanel> |
</grid:GridViewDataColumn.Footer> |
<grid:GridViewDataColumn.GroupFooterTemplate> |
<DataTemplate> |
<StackPanel Orientation="Vertical" Margin="5,0"> |
<TextBlock Text="Tester:" Margin="0,0,0,2" /> |
<gridView:AggregateResultsList ItemsSource="{Binding}" VerticalAlignment="Center" Grid.Column="4"> |
<ItemsControl.ItemTemplate> |
<DataTemplate> |
<StackPanel Orientation="Horizontal" VerticalAlignment="Center"> |
<TextBlock VerticalAlignment="Center" Text="{Binding Caption}" /> |
<TextBlock VerticalAlignment="Center" Text="{Binding FormattedValue}" /> |
</StackPanel> |
</DataTemplate> |
</ItemsControl.ItemTemplate> |
<ItemsControl.ItemsPanel> |
<ItemsPanelTemplate> |
<StackPanel Orientation="Vertical" /> |
</ItemsPanelTemplate> |
</ItemsControl.ItemsPanel> |
</gridView:AggregateResultsList> |
</StackPanel> |
</DataTemplate> |
</grid:GridViewDataColumn.GroupFooterTemplate> |
</grid:GridViewDataColumn> |
</grid:RadGridView.Columns> |
</grid:RadGridView> |