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

Auto Reschedule Appointments Based on Appointment Move

1 Answer 66 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
ChrisC.
Top achievements
Rank 2
ChrisC. asked on 13 Oct 2010, 05:30 PM
Is there a way to have RadScheduler reschedule all appointments based on an appointment move?  What I mean is, if the user moves an appointment, it should adjust the start/end times of the rest of the appointments to fill in any empty timeslots.

What I'm trying to do is have the scheduler detect empty timeslots and move appointments automatically when an appointment fits in the empty timeslot.

1 Answer, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 25 Oct 2010, 09:36 AM
Hi Chris,

There could be a number of challenges with this scenario primarily related to the way you bind RadScheduler, the number of appointments and recurring appointments. In general, you can obtain the time shift in AppointmentUpdate and then use it to update the rest of the appointments.

protected void RadScheduler1_AppointmentUpdate(object sender, AppointmentUpdateEventArgs e)
   {
       TimeSpan timeShift = e.Appointment.Start - e.ModifiedAppointment.Start;
       foreach (Appointment a in RadScheduler1.Appointments)
       {
           a.Start = a.Start.Add(timeShift);
           a.End = a.End.Add(timeShift);
           RadScheduler1.UpdateAppointment(a);
       }
   }


Kind regards,
Peter
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Scheduler
Asked by
ChrisC.
Top achievements
Rank 2
Answers by
Peter
Telerik team
Share this question
or