Hi,
I'm using this example: https://demos.telerik.com/aspnet-core/grid/detailtemplate
I'm using the same apart from the "Orders" Tab i have called it "Notes", everything is working as expected. But i'd like to put the count of Notes also in the Tab Text i.e.
Text("Notes (#=kendo.format('{0:N}', data.aggregates.Note.count)#)")
I added the aggregate in the DataSource:
.Aggregates(aggregates =>{ aggregates.Add(p => p.Note).Count();})
But i get the following console error:
Uncaught TypeError: data.aggregates is undefined
Is there anyway to achieve what i'm after?
--- Complete Tab Code:
items.Add().Text("Notes (#=kendo.format('{0:N}', data.aggregates.Note.count)#)").Content( @<text> @(Html .Kendo() .Grid<TaskReportLineNote>() .Name("grid_#=JobNumber#") .Columns(columns => { columns.Bound(o => o.Posted).Width(150).Format("{0:dd/MM/yyyy HH:mm:ss}"); columns.Bound(o => o.Poster).Width(250); columns.Bound(o => o.Note); }) .DataSource(dataSource => dataSource .Ajax() .PageSize(5) .Sort(sort => sort.Add(p => p.Posted).Descending()) .Aggregates(aggregates => { aggregates.Add(p => p.Note).Count(); }) .Read(read => read.Action("GridNotes", "TaskReport", new { TaskId = "#=TaskId#" }))) .Pageable() .Sortable() .ToClientTemplate()) </text>);