I have the following in a .cshtml file:
@(Html.Kendo().Grid<TaxCertApp.ViewModels.ViewModel>()
.Name("FilingFeesGrid")
.Pageable()
.Sortable()
.Scrollable()
.HtmlAttributes(new { style = "height:500px;" })
.AutoBind(false)
.Columns(columns =>
{
columns.Bound(s => s.DistributionDate).Format("{0:MM/dd/yyyy}").Width(100).EditorTemplateName("Date");
columns.Bound(s => s.Disbursed)
.Format("{0:C2}")
.EditorTemplateName("Disbursed")
.Width(100)
.ClientFooterTemplate("Total: #=sum#")
.HtmlAttributes(new { style = "text-align: right" })
.FooterHtmlAttributes(new { style = "text-align: right" });
columns.Bound(s => s.Received)
.Format("{0:C2}")
.EditorTemplateName("Received")
.Width(100)
.ClientFooterTemplate("Total: #=sum#")
.HtmlAttributes(new { style = "text-align: right" })
.FooterHtmlAttributes(new { style = "text-align: right" });
columns.Bound(s => s.CHECKNO).Title("Check Number").Width(100);
columns.Bound(s => s.DESCRIPTION).Title("Description").Width(300);
})
.DataSource(dataSource => dataSource
.Ajax()
.PageSize(10)
.Aggregates(aggregates =>
{
aggregates.Add(p => p.Disbursed).Sum();
aggregates.Add(p => p.Received).Sum();
})
.Read(read => { read.Action("Fees", "Fees").Data("{ ID: " + @Model.ID + "}"); })
)
)
This generates a grid with 2 columns having sum aggregates. The format of those 2 columns is currency. How can I get the sum aggregates to display with the same currency format? I have included a picture of the rendered grid.
Question #2: How can I access the two aggregate sum's to display a "difference" number (the Disbursed sum - the Received sum)?