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

Group Header Template

2 Answers 319 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Vladyslav
Top achievements
Rank 1
Vladyslav asked on 11 Sep 2015, 10:17 AM

Hello guys,

 I'm working with latest version of Kendo UI (2015.Q2), Kendo Grid.

From this article I understand how to build aggregated values (summary values in the group's footers). But in my case I need to display this aggregated values in my group headers. For now I build workaround as child grids with same options and columns in the detail template (and make child's headers invisible). Something like the one on the screenshot (attached).

But I was needed to recalculate everything manually and add to parent node. It's not very good option for me.

Moreover now I realize that I will need to create second level of hierarchy (child can have own children). And it will be very complicated logic and code.

By searching I understand that "groups" are perfect solution for me, but group headers have been designed as a single cell, so I cannot use aggregates values inside and build similar structure. Maybe I can try to build header template as a grid with similar columns and do some styling, but it's just another workaround.

Can someone help me with this problem? Any chance to build group header template for each column (not single one)?

Thank you.

 

2 Answers, 1 is accepted

Sort by
0
Vladyslav
Top achievements
Rank 1
answered on 14 Sep 2015, 06:47 AM
Anyone?
0
Konstantin Dikov
Telerik team
answered on 14 Sep 2015, 12:50 PM
Hello Vladyslav,

The requirement that you have could not be achieved with the built-in functionality of the widget, because within the GroupHeaderTemplate you can get reference to the aggregates for the grouped filed only. Furthermore, as you have noticed, the group header is rendered within a single cell and it is not supported scenario to have multiple cells in the group header, unless your custom template does not contain a TABLE element with the same structure as the main grid.

Since you have already achieved the desired behavior with a nested grid, I would suggest that you keep using that approach, because it will be really difficult to retrieve the corresponding aggregates for each group from the footers, especially if you have multiple group levels.


Regards,
Konstantin Dikov
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
Vladyslav
Top achievements
Rank 1
Answers by
Vladyslav
Top achievements
Rank 1
Konstantin Dikov
Telerik team
Share this question
or