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