This is a migrated thread and some comments may be shown as answers.

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

1 Answer 841 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Simon
Top achievements
Rank 1
Simon asked on 17 May 2018, 01:23 PM

Hi, 

I'm looking for a way to show the sum of a column on the group line like in this example : https://docs.telerik.com/kendo-ui/knowledge-base/grid-align-group-header-with-cells, 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 : https://dojo.telerik.com/OcuquWOd

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 ?

Thanks,

 

 

 

1 Answer, 1 is accepted

Sort by
0
Preslav
Telerik team
answered on 18 May 2018, 11:27 AM
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:

Regards,
Preslav
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.
Tags
Grid
Asked by
Simon
Top achievements
Rank 1
Answers by
Preslav
Telerik team
Share this question
or