Here is my 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 a grid with order positions grouped by time added, group headers show timestamp, group footers show total sums. Now I want to have 2 things:

  1. Footer for the whole table with sums of net, gros and total. (#= sum # is not working here)
  2. Access the values of the group aggregates in the header, not only the timestamp

How can I make it?

Related posts

Recent Viewed