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

Custom Group Header Summaries

3 Answers 1633 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Keith
Top achievements
Rank 1
Keith asked on 01 May 2014, 01:24 PM
Is it possible with the Grid to create a custom summary in a group header.  I basically want to be able to group by a particular field and then contain some summary information based on other totals for the group.

Please see the exact behaviour I would like in a DevExpress grid
http://demos.devexpress.com/ASPxgridviewDemos/Summary/Group.aspx

3 Answers, 1 is accepted

Sort by
0
Petur Subev
Telerik team
answered on 05 May 2014, 07:23 AM
Hello Keith,

Basically you can customize the Group Header template through the GroupHeaderTemplate option of the column:

http://docs.telerik.com/kendo-ui/api/web/grid#configuration-columns.groupHeaderTemplate

However please notice that the template is only displayed when you have grouped by the same column, in contrast to the footer template.

You can test the same by modifying this live demo:

http://demos.telerik.com/kendo-ui/web/grid/aggregates.html

Kind Regards,
Petur Subev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Keith
Top achievements
Rank 1
answered on 06 May 2014, 07:19 AM
Hi Petur,

So you are basically saying I can only show the sum of a particular column if I group by that column?  This seems counter intuitive to me as one would usually group by a dimension (e.g. Department) and aggregate by a measure (e.g. Budget).   From what you are saying this is only possible in Footers.  So really the only useful thing that can be achieved in the group header is a count.
0
Petur Subev
Telerik team
answered on 07 May 2014, 06:55 AM
Hello Keith,

That's right the GroupHeader template defined in the Department column is only visible when you group by the Department column, in case you group by Budget you won't see it.

Regards,
Petur Subev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Grid
Asked by
Keith
Top achievements
Rank 1
Answers by
Petur Subev
Telerik team
Keith
Top achievements
Rank 1
Share this question
or