This question is locked. New answers and comments are not allowed.
I have noticed an oddity when grouping my grid and using aggregates. Most times, the "Sum" and "Average" aggregates do not seem to be displaying the correct values. It seems to display simply the first value in the group (i.e. I have a group of items where "Price" is 18.99, 17.99, 16.99, 15.99 and 14.99 and the group footer for average displays 18.99.
I should state that the grid is bound to an IEnumerable<dynamic> and my columns are also generated dynamically based on an XML definition. All of this is working properly; grouping works, filtering works, custom context menu works, all aspects of the grid other than the aggregate value are working properly.
Here is the bit of code I'm using to declare the grouping/aggregate:
Any information would be greatly appreciated. Thanks.
I should state that the grid is bound to an IEnumerable<dynamic> and my columns are also generated dynamically based on an XML definition. All of this is working properly; grouping works, filtering works, custom context menu works, all aspects of the grid other than the aggregate value are working properly.
Here is the bit of code I'm using to declare the grouping/aggregate:
builder.Aggregate(aggregates => aggregates.Average()).GroupFooterTemplate(item =>
string
.Format(
"Average: {0}"
, item.Average));
Any information would be greatly appreciated. Thanks.