我正在使用Kendo UI Complete v2013.2.918,尝试使用与一个组列相关的许多列显示聚合网格,聚合仅汇总最新行,我按照kendo页面上的示例进行操作同样但不做总和。知道这是什么问题吗?
这是我的代码:
detailGrid = $("#details_paginated_grid_table").kendoGrid({
columns: [
{ field: "CallDate", title: translate('DATE') },
{ field: "CallTime", title: translate('TIME') },
{ field: "From", title: translate('FROM') },
{ field: "Destination", title: translate('DESTINATION') },
{ field: "MaskedCalledNumber", title: translate('DIALNUMBER') },
{ field: "CallType", title: translate('CALLTYPE'), groupHeaderTemplate: "Name: #= value # total Call Type: #=count#" },
{ field: "CallDurationDisplay", title: translate('MINUTES'), footerTemplate: "Total: #=sum#", groupFooterTemplate: "Minutes: #=sum#", aggregates: ["sum"] },
{ field: "CallRateDisplay", title: translate('RATE'), footerTemplate: "Total: #=sum#", groupFooterTemplate: "Rate: #=sum#", aggregates: ["sum"] },
{ field: "LongDistanceChargeDisplay", title: translate('LD'), footerTemplate: "Total: #=sum#", groupFooterTemplate: "LD: #=sum#", aggregates: ["sum"] },
{ field: "PktDtVolDisplay", title: translate('DATA'), footerTemplate: "Total: #=sum#", groupFooterTemplate: "Data: #=sum#", aggregates: ["sum"] },
{ field: "TotalChargesDisplay", title: translate('TOTAL'), footerTemplate: "Total: #=sum#", groupFooterTemplate: "Charges: #=sum#", aggregates: ["sum"] }
],
dataSource: {
data: [],
group: {
field: "CallType",
aggregates: [
{ field: "CallDurationDisplay", aggregate: "sum" },
{ field: "CallRateDisplay", aggregate: "sum" },
{ field: "LongDistanceChargeDisplay", aggregate: "sum" },
{ field: "PktDtVolDisplay", aggregate: "sum" },
{ field: "TotalChargesDisplay", aggregate: "sum" },
{ field: "CallType", aggregate: "count" }
]
},
aggregate: [
{ field: "CallDurationDisplay", aggregate: "sum" },
{ field: "CallRateDisplay", aggregate: "sum" },
{ field: "LongDistanceChargeDisplay", aggregate: "sum" },
{ field: "PktDtVolDisplay", aggregate: "sum" },
{ field: "TotalChargesDisplay", aggregate: "sum" }
]
},
//sortable: false,
scrollable: false,
//pageable: false,
groupable: true,
height: 300,
});
这里有关于聚合的截图: