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

SumFunction in a GroupDescriptor

5 Answers 120 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Orit
Top achievements
Rank 1
Orit asked on 28 Jul 2009, 10:50 AM
Hi

I try to use a SumFunction in a GroupDescriptor in the following way
 
<telerik:RadGridView.GroupDescriptors> 
                                <telerik:GroupDescriptor Member="AccountName" SortDirection="Ascending">  
                                    <telerik:GroupDescriptor.AggregateFunctions> 
                                        <telerik:SumFunction SourceField="ActivityBudget" Caption="Invoices count:" /> 
                                    </telerik:GroupDescriptor.AggregateFunctions> 
                                </telerik:GroupDescriptor> 
                            </telerik:RadGridView.GroupDescriptors> 

but I get this error-

No method 'Sum' on type 'System.Linq.Enumerable' is compatible with the supplied arguments.

5 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 28 Jul 2009, 11:37 AM
Hi Orit,

Generally such error can happen if ActivityBudget is not numeric. Can you post a bit more info about your case?

Regards,
Vlad
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Orit
Top achievements
Rank 1
answered on 29 Jul 2009, 06:53 AM
The field is "float"
can this be the problem?
0
Orit
Top achievements
Rank 1
answered on 02 Aug 2009, 07:21 AM
Same problem in 

GridViewDataColumn.AggregateFunctions

 

when I try to use 
SumFunction

 

0
Orit
Top achievements
Rank 1
answered on 02 Aug 2009, 11:06 AM
whenever I make any change in the GroupDescriptors
The Visual Studio "fly" (is closed)

another thing is that if I put a GroupDescriptors
in my xaml I get an error in the Designer
and canot see the design of my xaml

This is the error-
Invalid property or field - 'FieldName' for type: Customer

0
Stefan Dobrev
Telerik team
answered on 03 Aug 2009, 03:42 PM
Hello Orit,

I have tried to replicate you problem with float grouping, but everything works fine on my end. I'm sending you my project so that you can verify it locally on your PC.

The problems with designer is that we generate a set of sample data - list of Customers. In this case when you add a new group descriptor (in design time) its member property should be equal to a property of the Customer type. However If you bind your grid declaratively (via ObjectDataProvider) Visual Studio will correctly bind the ItemsSource property and everything will work as expected. I have done just this in the sample project I'm sending you.

Hope this helps.

Regards,
Stefan Dobrev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
GridView
Asked by
Orit
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Orit
Top achievements
Rank 1
Stefan Dobrev
Telerik team
Share this question
or