I have an aggregate on the quantity column returning the sum. Is it possible for it to only return the total for one groupings instead of returning a total for each of my groupings? I would just like a total for the ShippedDate grouping.
/// Code ///
/// Code ///
01.
@(Html.Kendo().Grid(Model)
02.
.Name(
"Grid"
)
03.
.HtmlAttributes(
new
{ style =
"width:80%"
})
04.
.Columns(columns =>
05.
{
06.
columns.Bound(p => p.CountyID);
07.
columns.Bound(p => p.County);
08.
columns.Bound(p => p.OrderNum);
09.
columns.Bound(p => p.ShippedDate).Format(
"{0:MM/dd/yyyy}"
);
10.
columns.Bound(p => p.InvCode);
11.
columns.Bound(p => p.TagName);
12.
columns.Bound(p => p.Quantity)
13.
.ClientGroupFooterTemplate(
"Total: #=sum#"
);
14.
})
15.
.Groupable()
16.
.Pageable()
17.
.Sortable()
18.
.Filterable()
19.
.DataSource(dataSource => dataSource
20.
.Ajax()
21.
.Group(g => g.Add(p => p.CountyID))
22.
.Group(g => g.Add(p => p.County))
23.
.Group(g => g.Add(p => p.OrderNum))
24.
.Group(g => g.Add(p => p.ShippedDate))
25.
.Aggregates(aggregates =>
26.
{
27.
aggregates.Add(p => p.Quantity).Sum();
28.
})
29.
.Read(read => read.Action(
"CountyMonth_Read"
,
"Report"
).Data(
"CountyMonthData"
))
30.
.PageSize(10)
31.
32.
)
33.
34.
)