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

[Solved] Ajax aggregate

2 Answers 102 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.
Rafael
Top achievements
Rank 1
Rafael asked on 28 Apr 2011, 10:58 AM
I have nested grid with VacDuration column. 
It works fine when nested grid isn't empty

columns.Bound(v => v.VacDuration).Title("Duration").ReadOnly(true)
                            .Aggregate(agr=>agr.Sum())
                            .ClientFooterTemplate("Total: <#= $.telerik.formatString('{0:0}', Sum)#>")


BUT, I get JavaScript exception in function below when nested grid doesn't contain any row

function anonymous(data) {
var p=[];with(data){p.push('Total: ', $.telerik.formatString('{0:0}', Sum),'');}return p.join('');
}

Please advise what was missed

2 Answers, 1 is accepted

Sort by
0
Jelle
Top achievements
Rank 1
answered on 31 May 2011, 11:03 AM
I'v got the exact same problem, does anyone know a solution?
0
Rafael
Top achievements
Rank 1
answered on 11 Jun 2013, 08:35 AM

columns.Bound(c => c.Days).Title(

 

"Working Days").Width(40).HtmlAttributes(new { style = "text-align:center" })

.Aggregate(aggreages => aggreages.Sum()).ClientFooterTemplate(

 

"<#= $.telerik.formatString('{0}', Sum)#>").FooterHtmlAttributes(new { style = "text-align:right; color:red" });

Tags
Grid
Asked by
Rafael
Top achievements
Rank 1
Answers by
Jelle
Top achievements
Rank 1
Rafael
Top achievements
Rank 1
Share this question
or