I have a grid displaying some data.
The columns are dynamically generated in code behind.
The grid allows for grouping.
The grid has a footer displaying aggregates for columns with numeric values.
When I have a column displaying FLOAT values, and I try to group by any column I get "Specified cast is not valid." error.
If I remove the aggregates, the grouping works.
This is the full text of the error:
Specified cast is not valid.
Anonymously Hosted DynamicMethods Assembly
at lambda_method(Closure , DataRow ) at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext() at System.Linq.Enumerable.Sum(IEnumerable`1 source) at lambda_method(Closure ) at System.Linq.EnumerableExecutor`1.Execute() at System.Linq.EnumerableQuery`1.System.Linq.IQueryProvider.Execute[S](Expression expression) at System.Linq.Queryable.Sum(IQueryable`1 source) at Telerik.Web.UI.GridBoundColumn.GetAggregateByType[T](IQueryable queryable, String fieldName, GridAggregateFunction func)
Any assistance in pointing me in the right direction would be greatly appreciated
The columns are dynamically generated in code behind.
The grid allows for grouping.
The grid has a footer displaying aggregates for columns with numeric values.
When I have a column displaying FLOAT values, and I try to group by any column I get "Specified cast is not valid." error.
If I remove the aggregates, the grouping works.
This is the full text of the error:
Specified cast is not valid.
Anonymously Hosted DynamicMethods Assembly
at lambda_method(Closure , DataRow ) at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext() at System.Linq.Enumerable.Sum(IEnumerable`1 source) at lambda_method(Closure ) at System.Linq.EnumerableExecutor`1.Execute() at System.Linq.EnumerableQuery`1.System.Linq.IQueryProvider.Execute[S](Expression expression) at System.Linq.Queryable.Sum(IQueryable`1 source) at Telerik.Web.UI.GridBoundColumn.GetAggregateByType[T](IQueryable queryable, String fieldName, GridAggregateFunction func)
Any assistance in pointing me in the right direction would be greatly appreciated