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

Empty collection causes JScript exception when using Ajax binding with aggregate

3 Answers 91 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Pak
Top achievements
Rank 1
Pak asked on 11 Apr 2011, 10:53 AM
Dear sir/madam

Please find attached sample project to illustrate this issue.

When a grid is using Ajax binding with aggregate in footer and the collection is empty, A JScript exception is thrown with this message: Microsoft JScript runtime error: Object required

Please see line 51 of HomeController that returns empty collection. If non-empty collection is returned, then the grid is bound correctly.

Thank you
Best regards

3 Answers, 1 is accepted

Sort by
0
Accepted
Rosen
Telerik team
answered on 11 Apr 2011, 01:41 PM
Hello Pak,

I was able to recreate the error in question. However, we managed to address it and I have attached an internal build which contains the fix. I have updated your telerik points too.

Also note that in this case you should slightly modify the template as when there are no data Sum property, as expected, will be undefined.

.ClientFooterTemplate("Total : <#= typeof Sum != 'undefined' ? Sum : 0 #>")


Regards,
Rosen
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Kevin
Top achievements
Rank 1
answered on 04 Aug 2011, 08:11 PM
I'm trying to figure out if this hotfix is included in the latest release of Telerik's extensions of ASP.NET MVC.  What version is the one that can be downloaded from here?
http://www.telerik.com/products/aspnet-mvc/download.aspx

Steve
0
Kevin
Top achievements
Rank 1
answered on 04 Aug 2011, 11:34 PM
It is in the Q2 release.  Can anyone point me to a readme list of items that were fixed?  I have this list after I install it, but is there one available that I can see before I decide to download and install it?

Steve
Tags
Grid
Asked by
Pak
Top achievements
Rank 1
Answers by
Rosen
Telerik team
Kevin
Top achievements
Rank 1
Share this question
or