I want to sum my orders as GrandTotal, But my grid cannot do it.
Grand Total row is always 0
Please help Urgent
Big Thanks
my grid
@(Html.Kendo().Grid((IEnumerable<Apex.Models.bmfsummary>)ViewData[
"BMFsummary"
])
.Name(
"Grid"
)
.Columns(cols =>
{
cols.Bound(ss => ss.eventdate).Title(
"Date"
).ClientFooterTemplate(
"Grand Total"
);
cols.Bound(ss => ss.totalPrice).Title(
"Total"
).Format(
"{0:n2}"
).ClientFooterTemplate(
"#=sum#"
);
})
.DataSource(dataSource =>
dataSource.Ajax()
.Aggregates(aggregates => { aggregates.Add(ss => ss.totalPrice).Sum(); } )
.Read(read => read.Action(
"Summary"
,
"BMF"
))
)