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

Aggregations in column footer do not update

2 Answers 38 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Roberth Klemetsen
Top achievements
Rank 1
Roberth Klemetsen asked on 18 Mar 2010, 04:06 PM

Using Q3 2009.
I am having a problem with SumFunction in column footer not updating when a value in the column/grid is updated. The Grid is located within a tabpage.

I have called the 

RadGridView1.CalculateAggregates();

And after iterating through

            RadGridView1.AggregateResults

I can see that the aggregates have been updated here, but when iterating through the AggregateResultList on the column, the values have not been updated. Hence the changes are not getting updated in the UI (I guess).

I have noticed that the UI does get updated when I change to another tab (in the Silverlight app) and back.

My column structure looks something like this:

<grid:GridViewDataColumn Header="header" TextAlignment="Right" HeaderTextAlignment = "Center" MinWidth="50" Width="Auto" IsSortable="False"

                                DataMemberBinding="{Binding Path=sourceField, Mode=TwoWay}" DataFormatString="{}{0:0.0}">

    <grid:GridViewDataColumn.AggregateFunctions>

        <data:SumFunction Caption="" ResultFormatString="{}{0:0.}" SourceField="sourceField1"/>

        <data:SumFunction Caption="" ResultFormatString="{}{0:0.}" SourceField="sourceField2"/>

        <data:SumFunction Caption="" ResultFormatString="{}{0:0.}" SourceField="sourceField3"/>

    </grid:GridViewDataColumn.AggregateFunctions>

    <grid:GridViewDataColumn.Footer>

        <StackPanel Orientation="Vertical" Margin="5,0" HorizontalAlignment="Right">

            <gridView:AggregateResultsList ItemsSource="{Binding}" VerticalAlignment="Center" Grid.Column="4" HorizontalContentAlignment="Right" HorizontalAlignment="Right" >

                <ItemsControl.ItemTemplate>

                    <DataTemplate>   

                        <StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Right">

                            <TextBlock VerticalAlignment="Center" Text="{Binding Path=Caption, Mode=OneWay}" HorizontalAlignment="Right" TextAlignment="Right"/>

                            <TextBlock VerticalAlignment="Center" Text="{Binding Path=FormattedValue, Mode=OneWay}" HorizontalAlignment="Right" TextAlignment="Right" />   

                        </StackPanel>

                    </DataTemplate>

                </ItemsControl.ItemTemplate>

                <ItemsControl.ItemsPanel>

                    <ItemsPanelTemplate>

                        <StackPanel Orientation="Vertical" />

                    </ItemsPanelTemplate>

                </ItemsControl.ItemsPanel>

            </gridView:AggregateResultsList>

        </StackPanel>

    </grid:GridViewDataColumn.Footer>

</grid:GridViewDataColumn>

 

Bottom line is that if there is some code I can call manually to make the UI update itself like when a user changes a tabpage and back, I can live with that solution if there are no apparent flaws in my code (even though I'm guessing there is).

 Regards

 

2 Answers, 1 is accepted

Sort by
0
Pavel Pavlov
Telerik team
answered on 18 Mar 2010, 04:11 PM
Hello Roberth Klemetsen,

Thank you for the detailed report ! I believe you have hit a known bug in the Q3 and it  was fixed for the Q1 release . Have you tried your code against the latest   2010 /Q1  binaries ?

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
Roberth Klemetsen
Top achievements
Rank 1
answered on 19 Mar 2010, 09:02 AM
Actually, yes. It did resolve my problem.
Thank you for the quick response!

regards
Tags
GridView
Asked by
Roberth Klemetsen
Top achievements
Rank 1
Answers by
Pavel Pavlov
Telerik team
Roberth Klemetsen
Top achievements
Rank 1
Share this question
or