Hi
Today I have a grid, where each time I aggregate column, it show the sum of an specific column for each agregation.
Now I what to show, together with the aggregated sum, the percentage inner agregate sum/ outer aggregate sum.
Example:
Lets pretend I aggregate columns A and them B.
The footer of aggregation A, should show: "sum agregate A" and "'sum agregate A' / 'sum (total)'"
The footer of aggregation B, should show: "sum agregate B" and "'sum agregate B' / 'sum agregate A'"
How can i do that?
.
​
5 Answers, 1 is accepted
In general, the widget can display total sum of a column, if not group. If the source is grouped, then the grid will display the aggregate per group plus the total aggregated value, as it is shown in this online demo.
If you would like to access the group aggregate in total aggregate, then it will not be possible.
Would it be possible to elaborate a bit more (more numbers will be very helpful) on this requirement?
Regards,
Georgi Krustev
Telerik
Out current grid, which we were looking to move to KendoUI Grid, shows totals and sub-totals and percentage when the grid has filtering applied. (Screenshot attached.) (The aggregates are computed on the server as there can be tens of thousands of records in the result set.)
The loss of this feature will be a big problem.
Are there any possible solutions?
Will the Grid component be updated to include this feature?
The Grid can display custom aggregates, which are calculated on the server without a problem. For instance, here is a Dojo demo that shows this process in a simplified way: In order to use the server aggregation, you will need to set the serverAggregates option to true. Once this is done, define the DataSource schema, which tells where the aggregates are placed. Finally, you will need to define the list of aggregates that will be returned from the server.
With this configuration, the data source is capable to retrieve different custom aggregates that are calculated on the server. To show them in the grid, you just need to define a footerTemplate and render the list of aggregates you have.
Regards,
Georgi Krustev
Telerik
Thanks for your reply, that's really useful. I can get the original totals by using custom aggregates.
May I suggest that the documentation is updated to make it clear that custom aggregates are possible; it states clearly that:
The supported aggregates are "average", "count", "max", "min" and "sum".
http://docs.telerik.com/kendo-ui/api/javascript/ui/grid#configuration-columns.aggregates​
Hello Richard,
Thank you for your suggestion.
Since this is the help article for columns.aggregates of Kendo UI Grid only the the built-in aggregates( calculated out of the box) are listed. They are "average", "count", "max", "min" and "sum".
Custom aggregates should be defined on data source level, so this is the reason why they are explained in the schema.aggregates of the Kendo UI DataSource.
Anyway thank you for sharing your feedback with us.
Regards,Boyan Dimitrov
Telerik