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

Triggering Datasource's Sync when a row is removed from a Grid

1 Answer 245 Views
Data Source
This is a migrated thread and some comments may be shown as answers.
Mekbib
Top achievements
Rank 1
Mekbib asked on 09 Feb 2012, 01:40 PM
I was having a grid where there is a need to edit and delete rows.

Thankful for Kendo UI i got every configuration perfectly working for both update and delete operations. Yet both operations sync the data through the transport when i click on the save changes button on the toolbar. What i wanted was to do the sync when a delete button is clicked after the confirmation has displayed and the user made the decision to delete the row.

I have experimented with the remove event of the grid yet i discovered  that what ever code is put in that block it will be executed before the row is removed from the grid.

Any way that i can sync the datasource after a row is removed from a grid without having to click on the save changes button on the tool bar?

Regards, Mekbib A.

1 Answer, 1 is accepted

Sort by
0
Mekdelawit
Top achievements
Rank 1
answered on 09 Feb 2012, 03:29 PM
It seems to me that you have managed to capture the event from the delete row. At the instance of creation denko grid creates a model data (a JSON array similar to the one the server sends through the transport) populated on the grid and manipulates it when delete and edit operations are performed. So you can access the grid object from which you can get the modified JSON array on the model and do a submit to the server using jquery AJAX.
Tags
Data Source
Asked by
Mekbib
Top achievements
Rank 1
Answers by
Mekdelawit
Top achievements
Rank 1
Share this question
or