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

[Solved] Multiple clientside updates/inserts at once

1 Answer 100 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Lukas
Top achievements
Rank 2
Lukas asked on 08 May 2009, 09:59 AM
Hi,

I'm trying to create a clientside function to insert a break-appointment in an existing appointment.
The scheduer is updated via AJAX.

for example
1 Appointment from 10:00 to 14:00
 1. |10:00 -------------------------------------------------------------------------------  20:00|
                                             ^oldAppointment^
after inserting the break there should be 3 appointments like this:

1.|10:00 ------------- 15:00|  2.|15:00 -------------  16:00|  3.|16:00 ------------- 20:00|
       ^oldAppointment^                ^breakAppoinment^        ^afterbreakAppointment^
I hope i explained it comprehensible.
What I am doing so far is this:
When click on the existing big appointment this is fired (pseudo code / real code is syntactically correct, but too complex to post ):
oldAppoinment.set_end(15:00); 
 
var breakAppointment = new Telerik.Web.UI.SchedulerAppointment(); 
breakAppointment.set_start(15:00); 
breakAppointment.set_end(DateAdd(16:00);

var afterbreakAppointment = new Telerik.Web.UI.SchedulerAppointment();

breakAppointment.set_start(16:00); 
breakAppointment.set_end(DateAdd(20:00);

scheduler.insertAppointment(afterbreakAppointment);
scheduler.updateAppointment(oldAppoinment);
scheduler.insertAppointment(breakAppointment);



When this event is fired is see 3 async-postack sent to the server, but only the last one (scheduler.insertAppointment(breakAppointment)) gets an answered, the other two(scheduler.updateAppointment(oldAppoinment);scheduler.insertAppointment(afterbreakAppointment);) remain waiting for an answer until timeout.

Is there a way to send these 3 commands in a single postback?
Or can I even setup the scheduler so the client can manipulate appointments as he likes an postback the whole scheduler-viewstate; like a "save changes"-button.

The RADTreeView has this functionality (trackChanges/commitChanges)

Any idea how I could resolve this problem.
I'd appreciate any help!

thanks in advance,
Lukas

1 Answer, 1 is accepted

Sort by
0
Lukas
Top achievements
Rank 2
answered on 08 May 2009, 11:53 AM
Or is there a way to hold the next AJAX request until the previous one has finished?
Tags
Scheduler
Asked by
Lukas
Top achievements
Rank 2
Answers by
Lukas
Top achievements
Rank 2
Share this question
or