Hello,
What I am trying to accomplish is to bind the data in a column's footer to something other than the results of an aggrigate function. The reason for this is the aggregates I am trying to display are conditional based on values from other columns. For example if I have a property called IsValid and another property called MyValue I want to show an aggregate of the sum of MyValue where IsValid is true. I have found no clean way to do this with the way the custom aggregates are built. They are only aware of the value of the column they are in.
What i would rather do is maintain a TotalRow object that contains the same fields as the objects in the ItemsSource but I will maintain the values in those fields by calling my own custom code when the values change from the ItemsSource. Basically I want to do this:
However, the above does not appear to work.
Any assistance is appreciated.
Dan
What I am trying to accomplish is to bind the data in a column's footer to something other than the results of an aggrigate function. The reason for this is the aggregates I am trying to display are conditional based on values from other columns. For example if I have a property called IsValid and another property called MyValue I want to show an aggregate of the sum of MyValue where IsValid is true. I have found no clean way to do this with the way the custom aggregates are built. They are only aware of the value of the column they are in.
What i would rather do is maintain a TotalRow object that contains the same fields as the objects in the ItemsSource but I will maintain the values in those fields by calling my own custom code when the values change from the ItemsSource. Basically I want to do this:
<telerikgrid:GridViewDataColumn.Footer> |
<TextBlock Text="{Binding TotalRow.MyValue}"/> |
</telerikgrid:GridViewDataColumn.Footer> |
However, the above does not appear to work.
Any assistance is appreciated.
Dan