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

Display aggregate footer

2 Answers 183 Views
Grid
This is a migrated thread and some comments may be shown as answers.
sg
Top achievements
Rank 1
Veteran
sg asked on 17 Sep 2020, 09:09 AM

Hi,

I want to show aggregate footer in my grid. 

I have checked on https://www.telerik.com/kendo-angular-ui/components/grid/grouping/aggregates/ for the aggregate footer. However, I cannot apply it into my coding. As I am getting data from WebAPI and then bind into grid. So my columns are all dynamic. I cannot define the aggregates and state.group as per shown in the website.

public aggregates: any[] = [{ field: 'UnitPrice', aggregate: 'average' }, { field: 'Discontinued', aggregate: 'count' }];
 
    public state: State = {
        skip: 0,
        take: 5,
        group: [{ field: 'Discontinued', aggregates: this.aggregates }]
    };

 

Is there any workable sample similar to my case to refer? Thank you.

2 Answers, 1 is accepted

Sort by
0
sg
Top achievements
Rank 1
Veteran
answered on 18 Sep 2020, 08:23 AM

To add-on, I am using custom data binding which is similar with the example provided here:  https://www.telerik.com/kendo-angular-ui/components/grid/data-binding/automatic-operations/#toc-custom-directives

Can anyone show how to enable aggregate footer from the above example? Quite urgent, due date of my assignment is close, please help. Thank you so much.

0
Ivan
Telerik team
answered on 21 Sep 2020, 07:16 AM

Hello SG,

Could you provide us a bit more details in order to assist you with this issue.

The main question is how data is coming from the server. If the data comes page by page all group and aggregate operations should be implemented on server side, else those should be implemented in the data service , upon successful data retrieving. The result can be examined ( column lookup ) and data processed with @progress/kendo-data-query process function, before bond to the grid.

Also if there are any code samples , runnable stackblitz project or zipped project folder would help us to solve this request.

 

Regards,
Ivan
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
Grid
Asked by
sg
Top achievements
Rank 1
Veteran
Answers by
sg
Top achievements
Rank 1
Veteran
Ivan
Telerik team
Share this question
or