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

Kendo Mvc grid not refreshing aggregates on delete

2 Answers 924 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Sp
Top achievements
Rank 1
Veteran
Sp asked on 02 Nov 2020, 09:29 PM

Hi Team,

 

Currently i am working on KenoMvc Grid , which have group by  on two columns and we are showing aggregates in  group footers.

On inline row delete row got deleted but aggregates not updating . Please explain me what could be the reason. 

Please help me to understand the grid refresh on edit.

 

 

Thanks & Regards,

Purnima.

2 Answers, 1 is accepted

Sort by
1
Alex Hajigeorgieva
Telerik team
answered on 04 Nov 2020, 03:35 PM

Hello, Purnima,

The reason for the aggregates not updating when a row is deleted is likely because the grid in your project uses server operations which is the default.

You can update the grid aggregates by calling the dataSource read() method in the data source RequestEnd() event:

// add an event handler to the data source
 .Events(e=>e.RequestEnd("requestEnd"))

 function requestEnd(e) {
        if (e.type !== "read") {
            this.read();
        }
    }

Alternatively, you may switch to client data operations instead, then everything will be recalculated on the client. You can do this by setting ServerOperation(false)

.DataSource(dataSource => dataSource
    .Ajax()
    .ServerOperation(false)

Regards,
Alex Hajigeorgieva
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/.

0
Sp
Top achievements
Rank 1
Veteran
answered on 06 Nov 2020, 12:20 PM

Dear Alex Hajigeorgieva, 

 

Thank you !! so much , for your explanation. And its works great . 

 

Thank you!!

SP

Tags
Grid
Asked by
Sp
Top achievements
Rank 1
Veteran
Answers by
Alex Hajigeorgieva
Telerik team
Sp
Top achievements
Rank 1
Veteran
Share this question
or