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

Grid Aggregates/Grouping displaying incorrect values

1 Answer 67 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
James
Top achievements
Rank 1
James asked on 01 Feb 2012, 06:53 PM
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:

builder.Aggregate(aggregates => aggregates.Average()).GroupFooterTemplate(item => string.Format("Average: {0}", item.Average));


Any information would be greatly appreciated.  Thanks.

1 Answer, 1 is accepted

Sort by
0
Petur Subev
Telerik team
answered on 03 Feb 2012, 10:38 AM
Hello James,


Basically the aggregates work as expected as shown in our demos. From the information you shared I am unable to locate the problem, so I would like to ask you to send a sample project which reproduces this behavior so we can investigate what causes it.


Kind regards,
Petur Subev
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the Telerik Extensions for ASP.MET MVC, subscribe to their blog feed now
Tags
Grid
Asked by
James
Top achievements
Rank 1
Answers by
Petur Subev
Telerik team
Share this question
or