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

Kendo Grid Server Sum & Average Aggregation Error

3 Answers 334 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Daniel
Top achievements
Rank 1
Daniel asked on 16 Nov 2018, 01:50 PM

Currently receiving the following error when attempting to implement server side sum aggregation when the grid is bound to a dynamic object.

No generic method 'Sum' on type 'System.Linq.Enumerable' is compatible with the supplied type arguments and arguments. No type arguments should be provided if the method is non-generic.

Using the following code to setup Aggregates, the col.DataType is System.Decimal. Min and Max aggregates work correctly.

.Aggregates(aggr =>
                {
                    Model.Columns.Where(x => x.SQLDataType == "money").ToList().ForEach(x =>
                    {
                        var col = Model.Columns.FirstOrDefault(c => c.ColumnName == x.ColumnName);
                        if (col != null)
                        {
                            aggr.Add(col.ColumnName, col.DataType).Sum();
                        }
                    });
                })

3 Answers, 1 is accepted

Sort by
0
Konstantin Dikov
Telerik team
answered on 21 Nov 2018, 11:25 AM
Hello Daniel,

For enabling aggregates for Grid bound to dynamic, please refer to the implementation in the following HowTo example:
If the issue persists, please open a regular support ticket and attach a sample, runnable project with dummy data that replicates the issue, so we can debug it locally.


Regards,
Konstantin Dikov
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Daniel
Top achievements
Rank 1
answered on 21 Nov 2018, 05:15 PM
I have attached a copy of a sample project to my ticket #1361849
0
Konstantin Dikov
Telerik team
answered on 26 Nov 2018, 03:27 PM
Hi Daniel,

My colleague is investigating the issue in project that you have attached and he will share his findings in the support ticket that you have opened. 

Regards,
Konstantin Dikov
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
Grid
Asked by
Daniel
Top achievements
Rank 1
Answers by
Konstantin Dikov
Telerik team
Daniel
Top achievements
Rank 1
Share this question
or