This is a migrated thread and some comments may be shown as answers.
Kendo Grid - Update in cell edit data
3 Answers 251 Views
This is a migrated thread and some comments may be shown as answers.
Michael
Top achievements
Rank 1
Michael asked on 17 Oct 2017, 06:22 PM

I have editable grid and wants to update (using Rest API) edited value in two cases 1) Call update function  in specific time interval 2)  Call update function when cell focus out.

I have separate JavaScript function to update remote data.

How to achieve this?

3 Answers, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 19 Oct 2017, 06:22 AM
Hello, Michael,

Regarding the requirements.

1) The sync method can be called inside an interval function. Please have in mind that if there are any updates, the Grid will be re-rendered and this may lead to loss of information if the user is currently editing a cell when the interval update occurs:

https://docs.telerik.com/kendo-ui/api/javascript/data/datasource#methods-sync

2) When the edited cell is focused out, this will trigger the save event, and on the save event the sync method can be called:

https://docs.telerik.com/kendo-ui/api/javascript/ui/grid#events-save

I hope this is helpful.

Regards,
Stefan
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Michael
Top achievements
Rank 1
answered on 24 Oct 2017, 06:10 AM

Is there any events instead of sync method to update in specific time intervals?

Save method doesn't have updated cell value at first time?

0
Stefan
Telerik team
answered on 26 Oct 2017, 04:54 AM
Hello, Michael,

The saveChanges method can be called, but this will just call sync internally:

https://docs.telerik.com/kendo-ui/api/javascript/ui/grid#methods-saveChanges

Could you please provide more details about the scenario where the cell value was not updated? Please have in mind that the cell will be updated only after the blur is fired, as this will notify the dataSource for the change.

Regards,
Stefan
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Grid
Asked by
Michael
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Michael
Top achievements
Rank 1
Share this question
or