I'm using a Kendo MVC grid with columns defined as follows:
columns.Bound(p => p.PoolId).Title("Pool").Hidden(true);
columns.Bound(p => p.Client).Title("Client").HtmlAttributes(new { @style = "min-width:120px;" })
.ClientGroupFooterTemplate("<div class=aright>#:value# Totals:</div>");
With a group on the "PoolId" field:
... .Group(group => group.Add(g => g.PoolId)) ...
Excel export works when I don't reference any Kendo values in the ClientGroupFooterTemplate (or don't include the footer template at all) but just silently fails (doesn't generate a file) when I try to reference any Kendo value using '#='
For example, the following works:
columns.Bound(p => p.Client).Title("Client").HtmlAttributes(new { @style = "min-width:120px;" })
.ClientGroupFooterTemplate("<div class=aright>Totals:</div>");
but the following is another example of a footer that fails:
columns.Bound(p => p.Client).Title("Client").HtmlAttributes(new { @style = "min-width:120px;" })
.ClientGroupFooterTemplate("<div class=aright>#= kendo.format('{0:C}', aggregates.PoolContributions.min) #</div>");
How do I get the Excel export working with ClientGroupFooterTemplate?
I'm using Kendo UI MVC version 2021.2.511.545
NOTE: PDF exports work properly
ALSO NOTE: I see the following error in the console
Uncaught ReferenceError: value is not definedat Object.eval [as groupFooterTemplate] (eval at compile (kendo.all.js:234), <anonymous>:3:82)
at kendo.all.js:15113
at Array.map (<anonymous>)
at init._footer (kendo.all.js:15107)
at init._dataRow (kendo.all.js:14952)
at init._dataRows (kendo.all.js:15005)
at init._rows (kendo.all.js:15245)
at init.workbook (kendo.all.js:14865)
at init.<anonymous> (kendo.all.js:15382)
at Object.d (jquery.min.js:2)