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

Moving recurring appointment

3 Answers 64 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Ilona
Top achievements
Rank 1
Ilona asked on 21 Jul 2010, 10:06 AM
Hi,

I'm trying to move a recurring appointment, but when the serverside-event OnAppointmentUpdate fires, the recurrencerule is not changed. For some reason we always use weekly recurrences, even if there's only one occurrence.

In the following example the start and enddate are changed one day earlier, but the recurrencerule is the same after moving the appointment and choosing "Move the series". How can I change the recurrencerule too?

Appointment before move:
Start = 22-07-2010 08:00
End = 22-07-2010 09:00
RecurrenceRule:
DTSTART:20100722T080000Z
DTEND:20100722T090000Z
RRULE:FREQ=WEEKLY;UNTIL=20100722T090000Z;INTERVAL=1;BYDAY=TH

Appointment after move:
Start: 21-07-2010 08:00
End: 21-07-2010 09:00
RecurrenceRule:
DTSTART:20100722T080000Z
DTEND:20100722T090000Z
RRULE:FREQ=WEEKLY;UNTIL=20100722T090000Z;INTERVAL=1;BYDAY=TH

3 Answers, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 26 Jul 2010, 03:19 PM
Hello Ilona,

In AppointmentUpdate, make sure you access e.ModifiedAppointment since e.Appointment is the appointment before the update:
protected void RadScheduler1_AppointmentUpdate(object sender, AppointmentUpdateEventArgs e)
   {
       Response.Write(e.ModifiedAppointment.RecurrenceRule);
   }

Let me know how it goes.

Cheers,
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
0
Ilona
Top achievements
Rank 1
answered on 26 Jul 2010, 03:32 PM
Hi Peter,

Thanks for your answer. I already use the e.ModifiedAppointment value:

 

 

 

 

protected

 

void RadScheduler1_AppointmentUpdate(object sender, AppointmentUpdateEventArgs e)

 

{

 

    SchedulerData sd = FindById(e.ModifiedAppointment.ID);

 

    sd.CopyInfo(e.ModifiedAppointment);

 

}

 


SchedulerData is my equivalent for AppointmentInfo, to store the data of the appointments. (which are schedules for us)

Cheers,
Ilona

0
T. Tsonev
Telerik team
answered on 29 Jul 2010, 02:25 PM
Hello Ilona,

In my tests the recurrence rule was partially updated to reflect the new date:

DTSTART:20100721T080000Z
DTEND:20100721T090000Z
RRULE:FREQ=WEEKLY;UNTIL=20100722T090000Z;INTERVAL=1;BYDAY=TH

The DTSTART and DTEND parts were updated correctly, but the BYDAY part is still set to Thursday.

The problem here is that we won't be able to reliably update the recurrence rule for more complex recurrence rules. I've checked how this is implemented in Outlook and it disallows the dragging of such appointments altogether. It only allows you to edit the selected occurrence.

In this case we can try to move the recurrence day, but this might produce unexpected results if the appointment is set to repeat on multiple days. For example if it's set to repeat on Wednesday and Thursday and you move the Thursday occurrence to Monday. Should we move the other occurrence to Sunday of the previous week? We can't represent this as a recurrence rule as it now spans two weeks.

If you're a certain that your customers use only weekly recurrence rules set to repeat on a single day of the week then we can try to patch the recurrence rule in the AppointmentUpdate event.

We're going to need to see a sample project in order to see why the DTSTART and DTEND fields are not being updated.

Kind regards,
Tsvetomir Tsonev
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
Ilona
Top achievements
Rank 1
Answers by
Peter
Telerik team
Ilona
Top achievements
Rank 1
T. Tsonev
Telerik team
Share this question
or