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

[Solved] kendo grid update aggregate on edit

1 Answer 1553 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Kake
Top achievements
Rank 1
Kake asked on 29 Jan 2015, 09:38 AM
Hi

Using a grid in batch editing mode. Have two aggregated sum in the footer (footerTemplate: "Total: #=sum#).

Is there a way to update the aggregated value when updating the grid (no postbacks)

1 Answer, 1 is accepted

Sort by
0
Accepted
Petur Subev
Telerik team
answered on 02 Feb 2015, 07:49 AM
Hello Marius,

By default only the current row that you modified is redrawn, the rest of the Grid remains unchanged - this is due to performance and selection state and focus state. You can manually force the Grid to redraw by using its refresh method. You can do this after the save event (use a timeout because save event is actually preventable).

e.g.

http://dojo.telerik.com/@pesho/UGoGI

Kind Regards,
Petur Subev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Frederic
Top achievements
Rank 1
Veteran
Iron
commented on 23 Nov 2021, 07:22 PM

Hi, I understand that you don't update all the grid for performance, scroll, focus... but can you update 2 rows instead of one, and update the footerTemplate row ?

The footertemplate is unusable in edit mode, I think you should also update it.

I don't want to refresh everything, as I will lose the scroll, rownumber, position, etc.

https://dojo.telerik.com/@foxontherock/IhiKeLiY

Thank you

Nikolay
Telerik team
commented on 25 Nov 2021, 10:02 AM

Hi Frederic,

I recommend re-drawing only the Grid footer and the group footers to show the new aggregates without rebinding the entire Grid. For a runnable example please refer to the following article:

Tags
Grid
Asked by
Kake
Top achievements
Rank 1
Answers by
Petur Subev
Telerik team
Share this question
or