This question is locked. New answers and comments are not allowed.
I'm having trouble with the ClientGroupFooterTemplate. When I choose a column to group by, it seems that there is some AJAX-related error with resolving the Count aggregate.
When I try to drag in a field to group by (Model, for instance), a WebPage error is returned ('Count' is undefined).
The Developer Tools debugger in IE shows the error at line 2 (in bold):
If I use the ClientFooterTemplate instead, it does not error at runtime but it displays the count (although it shows "0" which is incorrect).
@{Html.Telerik().Grid<Inventory>() .Name("InventoryGrid") .ToolBar(commands => commands .Custom() .HtmlAttributes(new { id = "export" }) .Text("Export to CSV") .Action("ExportCsv", "Order", new { page = 1, orderBy = "~", filter = "~" }) ) // bind operations using ajax .EnableCustomBinding(true) .ClientEvents(events => events.OnDataBinding("onDataBinding")) .ClientEvents(events => events.OnDataBound("onDataBindingForCSV")) .DataBinding(bind => bind.Ajax().Select("ListInventoryAjax", "Order")) .Columns(columns => { columns.Bound(i => i.Model) .Title("Model") .Width(40) .Aggregate(aggregates => aggregates.Count()) .ClientGroupFooterTemplate("Count: <#= Count #>"); columns.Bound(i => i.RegionId).Title("Region").Width(40); columns.Bound(i => i.DealerName).Title("Dealer").Width(40); columns.Bound(i => i.Product).Title("Product").Width(40); columns.Bound(i => i.OrderNumber).Title("Order #").Width(40); columns.Bound(i => i.SerialNumber).Title("Serial #").Width(40); columns.Bound(i => i.Detail).Title("Detail").Width(40); columns.Bound(i => i.ShipDate).Title("Shipped").Width(40); }) .Groupable() .Selectable() .Sortable() .Pageable(paging => paging.PageSize(20)) .Render(); }When I try to drag in a field to group by (Model, for instance), a WebPage error is returned ('Count' is undefined).
The Developer Tools debugger in IE shows the error at line 2 (in bold):
function anonymous(data) { var p=[];with(data){p.push('Count: ', Count ,'');}return p.join(''); }If I use the ClientFooterTemplate instead, it does not error at runtime but it displays the count (although it shows "0" which is incorrect).