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

radgrid exeption on databind aggregate=Sum

9 Answers 215 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Myriam
Top achievements
Rank 1
Myriam asked on 23 Sep 2008, 05:35 PM
Hello
I have a radgrid binded to a sqldatasource.
I'm trying to put an aggregate function (sum) on one of my column but on my form load, on the Radgrid1.Databind() it gives me this error:

An exception was raised by the target d' a call. (sorry for the traduction I used a web traductor)
in french(Une exception a été levée par la cible d'un appel.)

When I continue to execute my webform anyway, it gives me this error on the webform in explorer
"Détails de l'exception: System.NotSupportedException: Sum is not supported for type "System.Object""
here is my column

<telerik:GridNumericColumn

SortExpression="PRIX"

DataType="System.decimal"

HeaderText="PRIX"

DataField="PRIX"

UniqueName="PRIX"

DataFormatString="{0:C}"

Visible="true" Aggregate="Sum">

<ItemStyle HorizontalAlign="Right" Width="40px" />

</telerik:GridNumericColumn>

9 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 1
answered on 24 Sep 2008, 06:38 AM
Hello Myriam,

I tried setting the Aggregate property  for GridNumericColumns with the DataType also set to System.Decimal and it works as expected. Can you try using RadGrid.Rebind() instead of RadGrid.DataBind().

Thanks
Princy.
0
Myriam
Top achievements
Rank 1
answered on 24 Sep 2008, 01:04 PM
Hello Princy
I tried it and it gives me the same error. I also tried to put my field as double and I still get the same error...
0
Myriam
Top achievements
Rank 1
answered on 24 Sep 2008, 01:06 PM
Sorry I forgot to say that my aggregate function is in the detail table of my radgrid. Maybe it changes something?!
Thanks in advance
0
sp
Top achievements
Rank 1
answered on 13 Jan 2009, 10:02 PM
Is there a solution to this issue? I am running into the same problem. Thanks
0
Yavor
Telerik team
answered on 14 Jan 2009, 07:13 AM
Hi sp,

I tested the setup locally, and it behaved as expected.
If the issue persists, you can open a formal support ticket, and send us a small working project, demonstrating your setup, and the unwanted behavior. We will review it and get back to you with additional information.

Regards,
Yavor
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Kaj Bonfils
Top achievements
Rank 1
answered on 27 Feb 2009, 08:52 AM
The problem is that the datatype is "System.decimal"... This should be "System.Decimal" with a capital D... When writing the source code for the grid, the intellisence allows you to enter lower case datatypes, but only datatypes with proper casing will do the work.

Cheers.
0
Sebastian
Telerik team
answered on 27 Feb 2009, 09:49 AM
Hello all,

The issue with the case-sensitive datatype using the VS Intellisense will be addressed in the upcoming Q1 2009 release of the control, expected in the middle of March.

Best regards,
Sebastian
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
Chamin
Top achievements
Rank 1
answered on 04 Oct 2011, 06:41 AM
I'm also suffering this  issue.
At the moment I have using Telerik Version Q2 2011 released 09/15/2011.

Do you have proper solution for it?
0
Martin
Telerik team
answered on 04 Oct 2011, 02:03 PM
Hello Chamin,

As previously stated, the problem is already resolved. Attached is a short video showing the behavior I got on my side. Please review it and let me know whether I miss something.

Greetings,
Martin
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
Tags
Grid
Asked by
Myriam
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 1
Myriam
Top achievements
Rank 1
sp
Top achievements
Rank 1
Yavor
Telerik team
Kaj Bonfils
Top achievements
Rank 1
Sebastian
Telerik team
Chamin
Top achievements
Rank 1
Martin
Telerik team
Share this question
or