Hi,
On my grid, I'm using load date from Analysis Server and call CalculateAggregates to display sum. This works fine but when I specified myself the DataType of the column, I get the following error:
InvalidCastException: The specified cast is not valid.
With the following stacktrace:
à lambda_method(ExecutionScope , DataRowContainer )
à System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
à System.Linq.Enumerable.Sum(IEnumerable`1 source)
à lambda_method(ExecutionScope , IGrouping`2 )
à System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
à Telerik.Windows.Data.QueryableExtensions.Aggregate(IQueryable source, IEnumerable`1 aggregateFunctions)
à Telerik.Windows.Controls.GridView.GridViewDataControl.CreateAggregateResults()
à Telerik.Windows.Controls.GridView.GridViewDataControl.CalculateAggregates()
à Total.Book.IHM.SL.GridActions.SLGrid2.SetFooter()
How can I fix that ?
For information, here is my DataRowContainerClass which don't work:
On my grid, I'm using load date from Analysis Server and call CalculateAggregates to display sum. This works fine but when I specified myself the DataType of the column, I get the following error:
InvalidCastException: The specified cast is not valid.
With the following stacktrace:
à lambda_method(ExecutionScope , DataRowContainer )
à System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
à System.Linq.Enumerable.Sum(IEnumerable`1 source)
à lambda_method(ExecutionScope , IGrouping`2 )
à System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
à Telerik.Windows.Data.QueryableExtensions.Aggregate(IQueryable source, IEnumerable`1 aggregateFunctions)
à Telerik.Windows.Controls.GridView.GridViewDataControl.CreateAggregateResults()
à Telerik.Windows.Controls.GridView.GridViewDataControl.CalculateAggregates()
à Total.Book.IHM.SL.GridActions.SLGrid2.SetFooter()
How can I fix that ?
For information, here is my DataRowContainerClass which don't work:
[
DataContract]
public class DataRowContainer
{
[
DataMember]
public List<RowID> RowID { get; set; }
[
DataMember]
public object[] RawData { get; set; }
}
The RawData property contains the content of the row and I'm sure, after checking, that the Double column have only doubles values.
Any ideas ?
Thanks !