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

CRUD Create and Update Firing Twice

5 Answers 270 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Cyndie
Top achievements
Rank 1
Cyndie asked on 28 Oct 2013, 07:29 PM
I'm using CRUD for my scheduler with an aspx web service.  For the create and update event I am returning the created/updated event with the identifier in the json response, yet it is firing a second time as though something failed.  The response from the service is OK, so I'm not sure what could be causing this. 

What can I look at in the create/update complete event to tell if it added/updated the event?  Or is there a check somewhere in the javascript that if failed will cause it to fire again where I can put a break point and see what is happening?

Thanks.

5 Answers, 1 is accepted

Sort by
0
Rosen
Telerik team
answered on 29 Oct 2013, 08:08 AM
Hello Cyndie,

Unfortunately, the provided details are not sufficient in order to track the exact cause for the issue in question. However, I suspect that it may be due to incorrect format of response from the server. Could you please verify that the response structure match the one defined in the Scheduler's schema definition. 

If you continue to experience difficulties please provide bit more details about the exact structure of the response, the scheduler declaration etc.

Regards,
Rosen
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Cyndie
Top achievements
Rank 1
answered on 29 Oct 2013, 02:57 PM
Is the expected response for Create and Update different than for Read?  

Read only fires once, so it seems to like that response format.  I'm using the same Class in my web service for Read, Create and Update.  The only difference I see is that Read returns a List<Event> and Create and Update are just returning a single Event.  I tried changing Create to return a List<Event> like Read, but it still fires twice.

I also tried to change my Create Event to read the event back from the database identically to Read and return that instead of returning the event passed to it with no luck.
0
Rosen
Telerik team
answered on 29 Oct 2013, 04:42 PM
Hello Cyndie,

Indeed, the structure of the response should be the same for all of the DataSource CRUD operations.
Please provide a small runnable sample in which this behavior can be observed locally. This way we will be able to gather more details about the implementation and configuration of  your scenario and provide you with more to-the-point answer.

Regards,
Rosen
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Cyndie
Top achievements
Rank 1
answered on 29 Oct 2013, 06:01 PM
Unfortunately, I'm not sure that there is an easy way to create a runnable sample from this.  It is an intranet site, so you won't be able to query my web service.  This is why I originally wondered where in the code it is checking the response to put a break point, so I can step through it and try to figure out what is failing. 

I thought it might be related to the multi select that I have in my editor template, but I commented it out and still have the problem.
0
Cyndie
Top achievements
Rank 1
answered on 29 Oct 2013, 06:14 PM
I figured the problem out.  I have an editor inside my event template and if I changed something only in the editor, I had to manually mark the record in the datasource as dirty, and had a call to sync there that I didn't need.
Tags
Scheduler
Asked by
Cyndie
Top achievements
Rank 1
Answers by
Rosen
Telerik team
Cyndie
Top achievements
Rank 1
Share this question
or