GroupFooterTemplate works during load, but after removing the age from header and readding, the grid crashes.
Any suggestions?
Example in following link.
8 Answers, 1 is accepted
Thank you for the provided runnable Dojo.
The Kendo UI Grid column definition should also have its aggregates option defined so that the aggregate is available at all times:
https://docs.telerik.com/kendo-ui/api/javascript/ui/grid/configuration/columns.aggregates
When the columns.aggregates.sum is added, the work works without errors during grouping and ungrouping:
https://dojo.telerik.com/@bubblemaster/OzipEsIH
We have an issue logged for this particular use case and once that issue is fixed, it will not be necessary to have the aggregates in the column as well:
https://github.com/telerik/kendo-ui-core/issues/3522
Kind Regards,
Alex Hajigeorgieva
Progress Telerik
Thanks, this was helpful
I was looking at the example https://docs.telerik.com/kendo-ui/api/javascript/ui/grid/configuration/columns.groupfootertemplate
Actually I am trying to get the groupFooterTemplates, but is there a way to have the templates without having it grouped as default?
The Kendo UI Grid groupFooterTemplate and footer template are separate options of the grid and the groupFooterTemplate is generated when the grid is grouped only. Whereas the footer template is always shown. Can you let me know what is the desired outcome for the behaviour and appearance of the Kendo UI Grid so I can give you the most suitable suggestion for your case?
Look forward to hearing back from you.
Kind Regards,
Alex Hajigeorgieva
Progress Telerik
Thanks.
What I want is groupFooterTemplates defined, but not shown/grouped on grid initialization, but only when person groups it by herself.
So exactly as your example is, but it should look like this when loaded.
Oh, I think I figured it out.
Just remove the group tag.
https://dojo.telerik.com/oYoVOjAq
You are correct in your observation - the groupFooterTemplate is only visible when the Kendo UI Grid is grouped while the footer is always visible.
Should you have further questions, please feel free to get back to me.
Regards,
Alex Hajigeorgieva
Progress Telerik
Thanks Alex
I followed your example, but having trouble with 2 column groupings.
It is giving me error "Uncaught TypeError: Cannot convert undefined or null to object" during initialization.
When I remove the title from grouping and drag it back to top, then it works.
Any suggestions how to fix that error? I have the aggregates: ["average"] set at columns.
https://dojo.telerik.com/oYoVOjAq/2
Thank you for the provided Dojo.
The reason for the error is the missing data source group aggregates. If the initial desired state is grouped, we need to explicitly add the aggregates that are going to be used in the template, to the data source definition:
group: [{
field:
"age"
,
aggregates: [ { field:
"age"
, aggregate:
"average"
}, { field:
"title"
, aggregate:
"average"
}]
}, {
field:
"title"
,
aggregates: [{ field:
"title"
, aggregate:
"average"
},{ field:
"age"
, aggregate:
"average"
}]
}]
https://dojo.telerik.com/@bubblemaster/aHIzukeM
For a more comprehensive example, check out the official demo at:
https://demos.telerik.com/kendo-ui/grid/aggregates
Kind Regards,
Alex Hajigeorgieva
Progress Telerik