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

Grouped Grids at Design Time, dont show grouped footer data

5 Answers 51 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Nick Wood
Top achievements
Rank 1
Nick Wood asked on 18 Feb 2010, 11:03 PM
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:
<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> 

5 Answers, 1 is accepted

Sort by
0
Pavel Pavlov
Telerik team
answered on 24 Feb 2010, 11:46 AM
Hello Nick Wood,

Soon after the official release several fixes were applied to the footer cells and aggregate results. I believe downloading the latest internal build will fix the problem
The binaries should be available for download in your Client.Net account.

Best wishes,
Pavel Pavlov
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Nick Wood
Top achievements
Rank 1
answered on 25 Feb 2010, 12:10 AM
Hi Pavel

Thanks for the reply.

We have since changed over to Silverlight for this project as we are using your reporting suite and this is natively supported in Silverlight.

Have these fixes also been made available in Silverlight GridView?

Regards

Nick
0
Pavel Pavlov
Telerik team
answered on 01 Mar 2010, 03:18 PM
Hi Nick Wood,

I believe the fixes will be included in the upcoming official release (within less than two  weeks ) .

All the best,
Pavel Pavlov
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Nick Wood
Top achievements
Rank 1
answered on 19 Mar 2010, 01:05 AM
Hi

I have the latest 2010 Q1 build for silverlight and have retested this feature and it is not fixed.

When I group by loading from a settings xml file saved, there is no data in either the footer or the group footers.

Please advise which build this fix is in?

Nick
0
Pavel Pavlov
Telerik team
answered on 23 Mar 2010, 01:35 PM
Hello Nick Wood,

After carefully reviewing this thread I found that there might be some misunderstanding .
Please excuse me for that !

Here are some clarifications :

When grouping - RadGridView works with two different sets of  aggregate functions - one for the grid totals , and one for the group totals .

For convenience when the user groups the grid runtime , RadGridView automatically applies the already existing grid totals to the group totals (the reason you see aggregates in runtime).

In your case - when the groups are created , there are not yet functions for the grid defined , therefore nothing to copy to the groups.

So the solution - you will need to add aggregate functions to the GroupDescriptors as well so they can appear in groups.
For this the GroupDescriptor exposes the AggregateFunctions property.

Regards,
Pavel Pavlov
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
GridView
Asked by
Nick Wood
Top achievements
Rank 1
Answers by
Pavel Pavlov
Telerik team
Nick Wood
Top achievements
Rank 1
Share this question
or