1
我有一個有兩列興趣點的網格:美元金額和狀態。 該狀態可以是接受,待定或拒絕該行的美元金額Kendo UI MVC Grid根據列值在頁腳中顯示彙總數據
我想實現彙總功能以顯示總計美元待處理,以及總計美元接受。
這是我的網
@(Html.Kendo().Grid(Model)
.Name("Grid")
.DataSource(dataSource => dataSource
.Ajax()
.Aggregates(aggregates =>
{
aggregates.Add(p => p.AmountRequested).Sum();
})
.Read(read => read.Action("Applications_Read", "MyGrid"))
)
.Columns(columns =>
{
columns.Bound(c => c.RequestingOrg).Width(150);
columns.Bound(c => c.Telephone).Width(150);
columns.Bound(c => c.Email).Width(150);
columns.Bound(c => c.ContactName).Width(150);
columns.Bound(c => c.ContactTel).Width(150);
columns.Bound(c => c.AmountRequested).Width(150)
.Format("{0:C}")
.ClientFooterTemplate("<div> Pending: #= sum#</div><div>Approved: #= sum#</div>");
columns.Bound(c => c.TotalGoal).Width(150)
.Format("{0:C}");
columns.Bound(c => c.Sponsor).Width(150);
columns.Bound(c => c.Status)
.Filterable((filterable => filterable.UI("statusFilter")))
.Width(150);
})
//.Scrollable(s => s.Enabled(true).Height("auto"))
.Pageable()
.Sortable()
.Resizable(resize => resize.Columns(true))
.Selectable(selectable => selectable.Mode(GridSelectionMode.Single))
.HtmlAttributes(new {style = "height: 100%;"})
.Events(events => events.Change("GetSelectedRow"))
.Filterable(filterable => filterable
.Extra(false)
.Operators(operators => operators
.ForString(str => str.Clear()
.IsEqualTo("Is equal to")
))
)
)
我怎麼能在我的ClientFooterTemplate計算基於其他列的值之和規定?