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

[Solved] Aggregate returns NullreferenceException

2 Answers 307 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Grooverinthesouth
Top achievements
Rank 1
Grooverinthesouth asked on 29 Apr 2008, 11:29 AM
I have an IList<Myobject> which is bound to my grid. I have gross and net value gridboundcolumn's which have and aggregate set to "sum" and another column which has a Count aggregate which are all automatically rendered in the footer.

If my query returns an empty list I recieve a NullReferenceException instead of the default empty table which should return 'Zero' for the computed aggregates. If I remove the aggregate attributes from the columns the grid works fine.

My 'MyObject' class' gross value and net value are nullable decimals (decimal?) which are assigned null in the constructor, however if I remove the aggregate attributes on these two columns, the Count aggregate still produces the exception.
Any Ideas?

Thanks

2 Answers, 1 is accepted

Sort by
0
Cedric
Top achievements
Rank 2
answered on 30 Apr 2008, 05:25 PM
I have exactly the same problem!
0
Yavor
Telerik team
answered on 01 May 2008, 07:41 AM
Hi Cedric,

From the information supplied i suspect that the control cannot properly parse the value passed from the nullable object. You can send us a small working example, demonstrating your case, in a formal support ticket, for further investigation of the details of the problem.

All the best,
Yavor
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Grid
Asked by
Grooverinthesouth
Top achievements
Rank 1
Answers by
Cedric
Top achievements
Rank 2
Yavor
Telerik team
Share this question
or