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();
}
});
})