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

[Solved] Aggregate Column ClientFooterTemplate

1 Answer 97 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.
Jon
Top achievements
Rank 1
Jon asked on 10 Jan 2012, 05:56 PM
Hello,

I am receiving an error when rendering a grid (that contains no data) that has several aggregate columns defined with associated ClientFooterTemplates.

For example:

columns.Bound(x => x.Sent)              .Format("{0:,0}") .Width(48) .Aggregate(aggregates => aggregates.Sum())     .HeaderHtmlAttributes(new {@class="flushRight"}) .HtmlAttributes(new {@class="flushRight"}) .FooterHtmlAttributes(new {@class="flushRight"}) .ClientFooterTemplate("<#= Sum #>");

Additionally the following string format call is not working with the ClientFooterTemplate:

$.telerik.formatString('{0:c}', Sum)

This issue seems to be similar to : http://www.telerik.com/community/forums/aspnet-mvc/grid/empty-collection-causes-jscript-exception-when-using-ajax-binding-with-aggregate.aspx 

Question: Is this issue fixed in the current release (we are using: version - 2011.2.712.340) or will we need to use the Hot Fix identified in the referenced forum.

Thanks,
Jon

1 Answer, 1 is accepted

Sort by
0
Accepted
Daniel
Telerik team
answered on 13 Jan 2012, 08:36 AM
Hello Jon,

This issue was fixed in the Q2 2011 Service Pack One release. To avoid the error, you should update your version of the Telerik Extensions to 2011.2.914 or any subsequent one.

Greetings,
Daniel
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 Telerik Extensions for ASP.MET MVC, subscribe to their blog feed now
Tags
Grid
Asked by
Jon
Top achievements
Rank 1
Answers by
Daniel
Telerik team
Share this question
or