Kendo 聚合客户端页脚模板加号抛出异常

Kendo aggregate client footer template plus sign throws an exception

我想在我的聚合页脚中计算总计,但此代码对我不起作用。

请帮忙。

.ClientFooterTemplate("Grand total: #=kendo.toString(sum+sum, 'C')#");

这是预期的,因为使用正则表达式从模板中删除了加号。在当前情况下,更好的方法是调用将完成计算的外部函数。

.ClientFooterTemplate("Grand total: #=calculateAggregate(sum)#")

JavaScipt:

functio calculateAggregate(sum) {
  return kendo.toString(sum + sum, 'C');
}