Please let me know ASAP what I missing:
I noticed that when I try to update recurrence for the series the e.ModifiedAppointment.RecurrenceRule stays the same as
e.Appointment.RecurrenceRule.
How to find the value of the updated RecurrenceRule?
Thank you
9 Answers, 1 is accepted
I would like to clarify that this is a known issue and here at the bottom of the help article you may find a solution to your problem.
Regards,
Boyan Dimitrov
Telerik
I understand that I can update start and end time. But how I can
handle updated Recurrence Pattern, Recurrence Range, etc... if I don't have access to the form objects in
Scheduler_AppointmentUpdate Event.
Thank you
I need the answer ASAP, please
Please find here a useful information how you can work or update the recurrence rule.
Regards,
Boyan Dimitrov
Telerik
User updated recurrence on the Advanced Form and click on the save button.
From your previous reply I understand how to update start and end date.
How to update range and pattern for the modified appointment on the Appointment_Update event
Thank you
I would like to clarify that recurring appointments are created on the fly based on the recurrence rule of their associated parent appointment. So if you want to modify the recurrence rule when you update a recurrence appointment you need to access its parent and access the recurrence rule. The code snippet below shows a sample way of achieving this functionality:
//code behind
protected
void
RadScheduler1_AppointmentUpdate(
object
sender, AppointmentUpdateEventArgs e)
{
object
parentAppointmentID = e.ModifiedAppointment.RecurrenceParentID;
Appointment parentAppointment = RadScheduler1.Appointments.FindByID(parentAppointmentID);
string
recurrenceRule = parentAppointment.RecurrenceRule;
}
Regards,
Boyan Dimitrov
Telerik
I am edit the series, so
e.ModifiedAppointment.RecurrenceState = RecurrenceState.Master and
e.ModifiedAppointment.RecurrenceParentID IS NOTHING(NULL), so my question still does not have
answer or I am missing something .
User updated recurrence on the Advanced Form for recurring appointment - EDIT THE SERIES
and click on the save button.
From your previous reply I understand how to update start and end date.
How to update range and pattern for the modified appointment on the Appointment_Update event
Thank you
Your observations are absolutely correct and when the e.ModifiedAppointment RecurrenceState is "Master" you can retrieve directly its recurrence rule as shown in the code snippet below:
//code behind
protected
void
RadScheduler1_AppointmentUpdate1(
object
sender, AppointmentUpdateEventArgs e)
{
string
recurrenceRule =
string
.Empty;
if
(e.ModifiedAppointment.RecurrenceState == RecurrenceState.Master)
{
recurrenceRule = e.ModifiedAppointment.RecurrenceRule;
}
else
{
object
parentAppointmentID = e.ModifiedAppointment.RecurrenceParentID;
Appointment parentAppointment = RadScheduler1.Appointments.FindByID(parentAppointmentID);
recurrenceRule = parentAppointment.RecurrenceRule;
}
}
Regards,
Boyan Dimitrov
Telerik
So I return back to my first post:
"I noticed that when I try to update recurrence for the series
the e.ModifiedAppointment.RecurrenceRule stays the same as
e.Appointment.RecurrenceRule.
How to find the value of the updated RecurrenceRule?"
I am working with telerik version 2012.3.1016.40
The problem is that e.ModifiedAppointment.RecurrenceRule stays the SAME
I try to update recurrence rule for the Master(the series )
What I am missing?
Please help. Thanks
In order to avoid any further confusions I have prepared a sample project that implements very similar scenario - when user updates an appointment instance either a single or a recurring appointment the e.ModifiedAppointment.RecurrenceRule is updated properly. For your convenience the label control prints that recurrence rule below the RadScheduler control, so you can notice the change just after you update an appointment.
Regards,
Boyan Dimitrov
Telerik