This question is locked. New answers and comments are not allowed.
Please Help,
I have created several custom aggregates which calculation depends of other piece of the data, i.e. agg1 depends on agg2 and agg3.
When I am changing data for a column1 it calculates properly but column2 and column3 aggregates are not refresh.
I've tried to do a rebind on the grid which does not work either.
Also, I've tried CalculateAggregates which does not work as well.
So, if any of my fields P1 .... P12 changes I need to force recalculation on all fields P1..P12
Also, I tried to raise property changed event for dependent properties
Can you sugest better solution?
BTW, Using MVVM pattern
I have created several custom aggregates which calculation depends of other piece of the data, i.e. agg1 depends on agg2 and agg3.
When I am changing data for a column1 it calculates properly but column2 and column3 aggregates are not refresh.
I've tried to do a rebind on the grid which does not work either.
Also, I've tried CalculateAggregates which does not work as well.
... <telerik:GridViewDataColumn Header="Sep" IsFilterable="False" DataMemberBinding="{Binding P11, Mode=TwoWay}" DataFormatString="{}{0:C0}" GroupFooterTemplate="{StaticResource footerTemplate}"> <telerik:GridViewDataColumn.AggregateFunctions> <telerik:SumFunction SourceField="P11" ResultFormatString="{}{0:C0}" /> <Controls:GrossProfitP11 FunctionName="GPP11" ResultFormatString="{}{0:C0}" Caption="GP:" /> <Controls:GrossMarginP11 FunctionName="GMP11" ResultFormatString="{}{0:P2}" Caption="GM:" /> <Controls:OperationIncomeP11 FunctionName="OIP11" ResultFormatString="{}{0:C0}" Caption="OI:" /> <Controls:NetIncomeP11 FunctionName="NIP11" ResultFormatString="{}{0:P2}" Caption="NI:" /> </telerik:GridViewDataColumn.AggregateFunctions> </telerik:GridViewDataColumn> <telerik:GridViewDataColumn Header="Oct" IsFilterable="False" DataMemberBinding="{Binding P12, Mode=TwoWay}" DataFormatString="{}{0:C0}" GroupFooterTemplate="{StaticResource footerTemplate}"> <telerik:GridViewDataColumn.AggregateFunctions> <telerik:SumFunction SourceField="P12" ResultFormatString="{}{0:C0}" /> <Controls:GrossProfitP12 FunctionName="GPP12" ResultFormatString="{}{0:C0}" Caption="GP:" /> <Controls:GrossMarginP12 FunctionName="GMP12" ResultFormatString="{}{0:P2}" Caption="GM:" /> <Controls:OperationIncomeP12 FunctionName="OIP12" ResultFormatString="{}{0:C0}" Caption="OI:" /> <Controls:NetIncomeP12 FunctionName="NIP12" ResultFormatString="{}{0:P2}" Caption="NI:" /> </telerik:GridViewDataColumn.AggregateFunctions> </telerik:GridViewDataColumn> <telerik:GridViewExpressionColumn Header="%" UniqueName="CalcPercent" DataFormatString="{}{0:P2}" /> <telerik:GridViewDataColumn Header="Active" DataMemberBinding="{Binding IsActive}" IsReadOnly="True" /> </telerik:RadGridView.Columns> <telerik:RadGridView.GroupDescriptors> <telerik:GroupDescriptor Member="GroupNameSorted" SortDirection="Ascending"> </telerik:GroupDescriptor>...So, if any of my fields P1 .... P12 changes I need to force recalculation on all fields P1..P12
Also, I tried to raise property changed event for dependent properties
partial void OnP1Changed() { this.RaisePropertyChanged("CalculatedTotal"); this.RaisePropertyChanged("P2"); this.RaisePropertyChanged("P3"); this.RaisePropertyChanged("P4");....... }Can you sugest better solution?
BTW, Using MVVM pattern