<%= Html.Telerik().Grid<InvoiceLines>()
.Name("Quotes")
.Columns(columns =>
{
columns.Bound(c => c.ExternalDescription);
columns.Bound(o => o.JobValue)
.HeaderTemplate(h => { return "Value"; })
.Aggregate(a => a.Sum())
.ClientGroupFooterTemplate("<#=Sum#>")
.Format("{0:C}")
.Width(0);
columns.Bound(o => o.InvoiceLineValue)
.HeaderTemplate(h => { return "Value"; })
.Aggregate(a => a.Count())
.ClientGroupFooterTemplate("<#=Sum#>")
.Format("{0:C}")
.Width(0);
columns.Bound(o => o.SubmissionInvoiceLineValue)
.HeaderTemplate(h => { return "Value"; })
.Aggregate(a => a.Sum())
.ClientGroupFooterTemplate("<#=Sum#>")
.Format("{0:C}")
.Width(0);
})
.DetailView(detailView => detailView.ClientTemplate(
""
))
.DataBinding(dataBinding => dataBinding.Ajax()
.Select("_GetInvoiceLines", "Quotes", new { quoteId = Model.Quote.QuoteId }))
.Groupable(settings =>
settings.Groups(groups =>
{
groups.Add(g => g.Project);
groups.Add(g => g.Language);
groups.Add(g => g.TaskType);
})
.Visible(false))
%>
The idea is that you can see the total of the children without having to expand the group. Placing the values in the footer doesn't work as the footer is only visible when the group is expanded.
Thanks for any help offered