Kendo Grid Group Header Template Breaks During Layout Editing

1 Answer 52 Views
General Discussions Grid Templates
Rosemarie
Top achievements
Rank 1
Rosemarie asked on 18 Aug 2021, 11:54 PM | edited on 18 Aug 2021, 11:55 PM

This was my original reference for aligning the aggregates in their respective columns in the groupHeaderTemplate.

https://docs.telerik.com/kendo-ui/knowledge-base/grid-align-group-header-with-cells

A requirement is to have the grid have an editable layout, i.e., hide/show columns, be grouped differently, rearrange columns, etc.

By default, the grid is working properly, following the reference above.

But once you do edit the layout (e.g., hiding the tasksCompleted column) of the grid, the groupHeaderTemplate no longer works properly. As is expected because the column or table td's are defined and fixed.

Any ideas on how to properly set up the groupHeaderTemplate is much appreciated.

Here is the updated Kendo UI Dojo link as reference of the issue: https://dojo.telerik.com/IYuGOraj/2

1 Answer, 1 is accepted

Sort by
0
Georgi Denchev
Telerik team
answered on 23 Aug 2021, 12:36 PM

Hello, Rosemarie,

Thank you for the provided dojo.

You could call the dataBound code from within the columnShow and columnHide events as well, in order to update the colspan when you hide/show a column, however there will probably be other problems down the line.

Generally speaking, if you wish to display an aggregate over every column, you should utilize the groupHeaderColumnTemplate instead.

Dojo:

https://dojo.telerik.com/@gdenchev/aRayOgOc 

Let me know if you have any questions.

Best Regards,
Georgi Denchev
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Rosemarie
Top achievements
Rank 1
commented on 24 Aug 2021, 12:00 AM

Hi,

Thanks for the reply.

This approach is mostly working.

However, the same issue is happening when you try to change the grouping of the grid.

Any other options?

Georgi Denchev
Telerik team
commented on 26 Aug 2021, 10:55 AM

Hi, Rosemarie,

If you wish to change the field by which the data is grouped, you'll have to specify the aggregates in the columns configuration.

Updated example:

https://dojo.telerik.com/@gdenchev/aRayOgOc 

Let me know if you face any other issues.

Tags
General Discussions Grid Templates
Asked by
Rosemarie
Top achievements
Rank 1
Answers by
Georgi Denchev
Telerik team
Share this question
or