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

[Solved] Bug - Defining aggregates in RadGridView is dependent on order?

2 Answers 115 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Rob
Top achievements
Rank 1
Rob asked on 17 Dec 2010, 10:18 PM
I have discovered a problem with the RadGridView.  Please see the attached picture.  Notice that the order of the ".Columns" property and the ".GroupDescriptors" property (in XAML, but also when defined in code behind) seems to break whether or not the totals are displayed...

And my XAML:
<UserControl
    mc:Ignorable="d"
    x:Class="SilverlightApplication139.MainPage"
    Width="800" Height="600">
  
    <Grid x:Name="LayoutRoot" Background="White" DataContext="{Binding Source={StaticResource SampleDataSource}}">
          
        <Grid.RowDefinitions>
            <RowDefinition Height="1*" />
            <RowDefinition Height="20" />
            <RowDefinition Height="1*" />
        </Grid.RowDefinitions>
          
        <telerik:RadGridView Grid.Row="0" ItemsSource="{Binding Collection}" AutoGenerateColumns="False" ShowColumnFooters="True" ShowGroupFooters="True">
            <telerik:RadGridView.Columns>
                <telerik:GridViewDataColumn Header="P1" DataMemberBinding="{Binding Property1}" />
                <telerik:GridViewDataColumn Header="P2" DataMemberBinding="{Binding Property2}" />
                <telerik:GridViewDataColumn Header="P3" DataMemberBinding="{Binding Property3}">
                    <telerik:GridViewDataColumn.AggregateFunctions>
                        <telerik:SumFunction Caption="Total:" SourceField="Property3" />
                    </telerik:GridViewDataColumn.AggregateFunctions>
                </telerik:GridViewDataColumn>
            </telerik:RadGridView.Columns>  
            <telerik:RadGridView.GroupDescriptors>
                <telerik:GroupDescriptor Member="Property2" DisplayContent="P2" />
            </telerik:RadGridView.GroupDescriptors>
        </telerik:RadGridView>      
          
        <telerik:RadGridView Grid.Row="2" ItemsSource="{Binding Collection}" AutoGenerateColumns="False" ShowColumnFooters="True" ShowGroupFooters="True">
            <telerik:RadGridView.GroupDescriptors>
                <telerik:GroupDescriptor Member="Property2" DisplayContent="P2" />
            </telerik:RadGridView.GroupDescriptors>
            <telerik:RadGridView.Columns>
                <telerik:GridViewDataColumn Header="P1" DataMemberBinding="{Binding Property1}" />
                <telerik:GridViewDataColumn Header="P2" DataMemberBinding="{Binding Property2}" />
                <telerik:GridViewDataColumn Header="P3" DataMemberBinding="{Binding Property3}">
                    <telerik:GridViewDataColumn.AggregateFunctions>
                        <telerik:SumFunction Caption="Total:" SourceField="Property3" />
                    </telerik:GridViewDataColumn.AggregateFunctions>
                </telerik:GridViewDataColumn>
            </telerik:RadGridView.Columns>  
        </telerik:RadGridView>
          
    </Grid>
      
</UserControl>

2 Answers, 1 is accepted

Sort by
0
Rob
Top achievements
Rank 1
answered on 17 Dec 2010, 10:31 PM
Sorry forgot to mention.... we're using build '2010.3.1213.1040'

0
Maya
Telerik team
answered on 20 Dec 2010, 10:21 AM
Hi Rob,

Indeed, you are quite correct. I have logged the issue in our Public Issue Tracking System. You may follow its progress either by its ID - 4383 or directly through this link
Thank you for reporting this. I hope it is not a problem for you to define the GroupDescriptor after the definition of the columns. I have updated your Telerik points accordingly.
 

All the best,
Maya
the Telerik team
Browse the videos here>> to help you get started with RadControls for Silverlight
Tags
GridView
Asked by
Rob
Top achievements
Rank 1
Answers by
Rob
Top achievements
Rank 1
Maya
Telerik team
Share this question
or