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

Grid Popup editing update command

3 Answers 208 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Mark
Top achievements
Rank 1
Mark asked on 10 Aug 2018, 02:48 PM
     Is there a way to have the pop up editor only call the update command on an edited item when the update button is pressed on the popup? It looks like when they click in the next field to update the previous field calls the update command and it causes a lot of database overhead/ time waste if there are multiple fields that need to be updated. I may be missing something or my update code is messy (which it is) but it seems like I should be able to only have the one write back to the model instead of one after every field change.

3 Answers, 1 is accepted

Sort by
0
Mark
Top achievements
Rank 1
answered on 10 Aug 2018, 04:20 PM
I should also say that the reason I want to hold the update command till the end is that I need to do some data checking and want to make sure that all the data is updates are finished before I run my data check function.
0
Accepted
Tsvetina
Telerik team
answered on 14 Aug 2018, 11:21 AM
Hello Mark,

The behavior that you describe is not the normal behavior of the Grid when editing. It could be happening if your DataSource has an autoSync: true setting applied, which will fire a request every time a field is modified in the DataSource. This behavior is disabled by default and the Grid changes are saved only after clicking the respective Update/Save Changes button.

If there is no autoSync setting applied, could you show us your full Grid and DataSource declarations?

Regards,
Tsvetina
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Mark
Top achievements
Rank 1
answered on 14 Aug 2018, 03:34 PM
Ok it looks like it was the autosync option that was breaking it. It looks like I added that hoping to get the grid aggregates to work after a delete but I found another way to do that and just hadn't removed the autosync flag on the grid declaration. Thank you for your help!
Tags
Grid
Asked by
Mark
Top achievements
Rank 1
Answers by
Mark
Top achievements
Rank 1
Tsvetina
Telerik team
Share this question
or