我从这段代码中得到一个值为 0 的页脚。请问有人知道为什么吗?
谢谢
@(Html.Kendo().Grid(Model).HtmlAttributes(New With {.class = "kendoGrid"}) _
.Name("ExternalMailInvDetailsGrid") _
.Columns(Sub(c)
c.Bound(Function(p) p.Description)
c.Bound(Function(p) p.Quantity)
c.Bound(Function(p) p.UnitPrice)
c.Bound(Function(p) p.TotalPrice)
c.Bound(Function(p) p.GSTPrice).ClientFooterTemplate("#=sum#")
End Sub) _
.Pageable() _
.Selectable(Sub(sel)
sel.Mode(GridSelectionMode.Single)
End Sub) _
.Scrollable() _
.DataSource(Sub(c)
c.Ajax() _
.PageSize(8) _
.Aggregates(Sub(agg)
'agg.Add(Function(p) p.TotalPrice).Sum()
agg.Add(Function(p) p.GSTPrice).Sum()
End Sub) _
'.Group(Sub(g)
' g.Add(Function(p) p.TotalPrice)
' End Sub)
End Sub)
)
`
最佳答案
通过添加另一行代码:serveroperation(false)
此代码现在以某种方式神奇地工作了。
我还收到了 Telerik 团队的回复,他们认为如果我将剑道网格与服务器端数据绑定(bind),那么我应该使用 footertemplate 而不是 clientfootertemplate。希望这会对某人有所帮助。
关于.net - Kendo 网格聚合总和显示空页脚,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22317640/