I have the following lines in my page.
//Gives Error
<telerik:GridNumericColumn Aggregate="Sum" DataField="SubDetails.Value" HeaderText="Mon" UniqueName="Mon"
ItemStyle-HorizontalAlign="Right" FooterStyle-HorizontalAlign="Right" HeaderStyle-Wrap="true" />
//Working perfectly
<telerik:GridNumericColumn Aggregate="Sum" DataField="Units" HeaderText="Tue" UniqueName="Tue"
ItemStyle-HorizontalAlign="Center" HeaderStyle-Wrap="true" />
It gives me the following error
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NotSupportedException: Average is not supported for type "System.Object" at Telerik.Web.UI.GridBoundColumn.GetAggregateByType[T](IQueryable queryable, String fieldName, GridAggregateFunction func)
public Class Details1
{
public int Value { get; set }
}
public Class Details2
{
public int ID{ get; set }
public Details1 SubDetails { get; set }
}
Kindly guide me to solve this problem.
Thanks
Katte