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

Cannot Use SumFunction in Grid View

3 Answers 33 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Kelvin Kwok
Top achievements
Rank 1
Kelvin Kwok asked on 24 Nov 2010, 05:36 AM
Dear Telerik Team

I am currently facing a problem using SumFunction in Grid View, I can use Count, Max, Min  Functions except Sum and Average.
When I am using SumFuntion, it return an error with Type 'System.Linq.Enumerable' there is no generic method 'Sum'. 

I am using the code behind to do so, which you could see as below.
Dim group_constraint As New GroupDescriptor()
group_constraint.Member = "DELDATE"
group_constraint.SortDirection = ListSortDirection.Descending
group_constraint.DisplayContent = "DELDATE Group"
 
Dim c As New SumFunction
c.SourceField = "QTY"
c.Caption = "Total Count: "
group_constraint.AggregateFunctions.Add(c)
Me.dgProductionPlan.GroupDescriptors.Add(group_constraint)
In addition, my data grid, data source is from WCF, which WCF using LINQ to SQL to retrieve data from database.

Looking Forward your reply, ASAP!
Thank you

3 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 24 Nov 2010, 07:48 AM
Hi,

 Can you post more info about this property data type (DELDATE)? If this is not numeric type you will unable to use these functions. 

Greetings,
Vlad
the Telerik team
Browse the videos here>> to help you get started with RadControls for Silverlight
0
Kelvin Kwok
Top achievements
Rank 1
answered on 24 Nov 2010, 09:22 AM
Dear Telerik Team

Thank you for your prompt reply.
I have solved the same already.
0
Mark
Top achievements
Rank 1
answered on 29 Mar 2011, 10:10 PM
It would be great if we could use these functions on type 'money'.
Tags
GridView
Asked by
Kelvin Kwok
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Kelvin Kwok
Top achievements
Rank 1
Mark
Top achievements
Rank 1
Share this question
or