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

Appointment RecurrenceRule Change

1 Answer 102 Views
Scheduler and Reminder
This is a migrated thread and some comments may be shown as answers.
Sascha
Top achievements
Rank 1
Sascha asked on 17 May 2017, 02:20 PM

Hi,

I have a very special question.

Need to do this:
The user changes the "RecurrenceRule" of an appointment. Standard is, that the complete appointment series changes - the past, too. I have to identify the selected date of changing the recurrence and change the appointment from this day to all future occurences. Past must be unchanged. How can we get that?

Please see my examples attached.

I want to select Saturday 27th. Open the recurrence edit dialog. Then change the series to one hour later. Save. The result must be the same as in my screenshot. Is that possible?

Thanks for your help.

Sascha

1 Answer, 1 is accepted

Sort by
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 18 May 2017, 08:54 AM
Hello Sascha, 

Thank you for writing.  

The purpose of a recurrence rule is to affect all appointments that belong to it. In order to make an appointment differ from the common rule, you can create an exception to the MasterEvent.Exceptions collection. Additional information is available in the following help article: http://docs.telerik.com/devtools/winforms/scheduler/appointments-and-dialogs/working-with-recurring-appointments

Here is a sample code snippet for your reference: 
Appointment recurringAppointment = new Appointment(DateTime.Now.AddDays(-5),
    TimeSpan.FromHours(1.0), "Appointment Subject");
DailyRecurrenceRule rrule = new DailyRecurrenceRule(recurringAppointment.Start, 1, 10);
recurringAppointment.RecurrenceRule = rrule;
this.radScheduler1.Appointments.Add(recurringAppointment);
  
foreach (Appointment ev in recurringAppointment.GetOccurrences(DateTime.Today, DateTime.Today.AddDays(10)))
{
    
    ev.MasterEvent.Exceptions.Add(ev);
    ev.Start = ev.Start.AddHours(1);
    ev.End = ev.End.AddHours(1);
}

I hope this information helps. Should you have further questions I would be glad to help.

Regards,
Dess
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Scheduler and Reminder
Asked by
Sascha
Top achievements
Rank 1
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Share this question
or