Datasource Group, Grouping and Aggregates - Show the same aggregate values on all the group header.

2 posts, 0 answers
  1. Simon
    Simon avatar
    3 posts
    Member since:
    Feb 2018

    Posted 17 May 2018 Link to this post


    I'm looking for a way to show the sum of a column on the group line like in this example :, but for every group possible. In others words, I would like to show, let's say the total of Completed tasks no matter the grouping so if I group by age, the total of Completed tasks will be shown on the group header. If I group by age, the total of Completed tasks would be shown on the group header as well.

    By enabling the grouping in the Grid, it seems that this only works for the group specified in the data source.

    Please see my example :

    As you can see, the Count is only shown when the grid is grouped by Units in stocks. When the group is on another column, the Count is no more shown.

    Do you have any idea on how to achieve this ?





  2. Preslav
    Preslav avatar
    589 posts

    Posted 18 May 2018 Link to this post

    Hi Simon,

    Generally speaking, the columns.groupHeaderTemplate is used only when the Grid is grouped by this column.
    In order to show the desired data, implement a groupHeaderTemplate for every column.

    For example, check the modified Dojo:

    Progress Telerik
    Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top