This is a migrated thread and some comments may be shown as answers.
Kendo Grid Sending extraneous DELETE requests
2 Answers 55 Views
This is a migrated thread and some comments may be shown as answers.
Patrick
Top achievements
Rank 1
Patrick asked on 15 Oct 2013, 04:58 PM
I am experiencing a strange issue with my kendo grids; if I delete a row, the row is successfully removed, and the XHR DELETE request is successful. Any subsequent inserts or updates to my kendo grid however, are always sending an extraneous DELETE request, and failing. 

Also, if I delete multiple rows from my grid, then any subsequent inserts or updates will send multiple extraneous DELETE requests, one for each of the earlier successful deletes.

The extraneous DELETE requests are failing (status 500). Presumably because the rows in question have already been deleted. This causes the insert/update to fail as well.

Any clue to what's happening? Does the kendo grid queue up the DELETE requests but is somehow keeping successful DELETE requests in this queue?

Thanks in advance.

2 Answers, 1 is accepted

Sort by
0
Rosen
Telerik team
answered on 16 Oct 2013, 08:04 AM
Hi Patrick,

I'm afraid that it is not clear from the provided details what may be the exact cause for such behavior. Therefore, could you please provide more details about the implementation, such as grid/dataSource configuration, as well as the response from the delete request.

Usually such behavior signifies that the changes are not accepted, thus the DataSource is trying to resend them with the next sync.

Regards,
Rosen
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Patrick
Top achievements
Rank 1
answered on 16 Oct 2013, 08:09 PM
After some searching around, I was able to solve this.

I changed my delete action to return an empty JSON string upon a successful delete operation. Before that it was returning an empty string, which is not valid JSON. In my case the problem was only happening on a remotely published website, but when running it locally the delete requests were not being repeated. I'm not sure why that is (maybe something to do with the fact that these are XHR requests??). Anyway it works everywhere after my change.

Here are some of the other posts describing similar problems.

http://stackoverflow.com/questions/15641686/kendo-ui-grid-repeat-the-request-to-the-server-error

http://stackoverflow.com/questions/17883502/kendo-ui-grid-fires-crud-operations-multiple-times

http://www.kendoui.com/forums/kendo-ui-framework/data-source/crud-server-response-or-repeating-crud-operations.aspx

Tags
Grid
Asked by
Patrick
Top achievements
Rank 1
Answers by
Rosen
Telerik team
Patrick
Top achievements
Rank 1
Share this question
or