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

CRUD operations via Ajax problems

1 Answer 85 Views
Grid
This is a migrated thread and some comments may be shown as answers.
John
Top achievements
Rank 1
John asked on 04 Apr 2013, 12:02 PM
I've implemented a simple grid with popup editor templates. CRUD operations are implemented using AJAX calls.

Problem 1 - Duplicate records being created. 
I create a first record and it is added fine. When I create a second record, the first one is duplicated (along with the second record being created). I have resolved this issue by setting the ID of the model on creation and returning to client. 

Problem 2 - Multiple Delete calls
When I delete one record it works fine. When I delete a second record, two calls are made, this one and the previous one. As the previous record has already been deleted an exception is generated.

Problem 1 and 2 are both resolved if I refresh the browser after each operation. Is this a known issue? Is there a way to manually refresh the grid after each operation?  

1 Answer, 1 is accepted

Sort by
0
Accepted
John
Top achievements
Rank 1
answered on 04 Apr 2013, 12:11 PM
Okay, I've finally found the sticky on the problem. Q1 2013 (v. 2013.1 319) break in Update / Destroy)

http://www.kendoui.com/forums/mvc/general-discussions/update-destroy-operations-trigger-the-error-event-of-the-datasource-after-updating-to-q1-2013-(v-2013-1-319).aspx
Tags
Grid
Asked by
John
Top achievements
Rank 1
Answers by
John
Top achievements
Rank 1
Share this question
or