Kendo UI grid aggregate using groups and Razor syntax -
here grid (bit simplified):
@(html.kendo().grid().columns(columns => { columns.bound(x => x.timestamp).hidden(true) .clientgroupheadertemplate("#= value #"); columns.bound(x => x.net); columns.bound(x => x.gros); columns.bound(x => x.total) .clientgroupfootertemplate("# sum #"); }) .pageable(p => p.enabled(false)) .sortable(s => s.enabled(false)) .groupable(g => g.enabled(false)) .scrollable(s => s.enabled(false)) .datasource(source => source .ajax() .aggregates(aggregates => { aggregates.add(c => c.net).sum(); aggregates.add(c => c.gros).sum(); aggregates.add(c => c.total).sum(); }) .group(groups => { groups.add(c => c.timestamp); })))
it shows grid order positions grouped time added, group headers show timestamp, group footers show total sums. want have 2 things:
- footer whole table sums of net, gros , total. (#= sum # not working here)
- access values of group aggregates in header, not timestamp
how can make it?
i have posted question telerik forum.
http://www.telerik.com/forums/access-group-aggregates-in-group-header-in-razor
Comments
Post a Comment