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

Editing a recurring appointment - Edit the series

9 Answers 64 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Yelena
Top achievements
Rank 1
Yelena asked on 20 Jun 2013, 02:56 PM

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

Sort by
0
Boyan Dimitrov
Telerik team
answered on 21 Jun 2013, 12:30 PM
Hello,

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
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
0
Yelena
Top achievements
Rank 1
answered on 21 Jun 2013, 05:07 PM
Thank you for the  quick reply. 
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

 

0
Boyan Dimitrov
Telerik team
answered on 24 Jun 2013, 03:37 PM
Hello,

Please find here a useful information how you can work or update the recurrence rule.

Regards,
Boyan Dimitrov
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
0
Yelena
Top achievements
Rank 1
answered on 24 Jun 2013, 04:53 PM
Thank you for your reply.  Let me clarify my question: 
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



0
Boyan Dimitrov
Telerik team
answered on 26 Jun 2013, 11:50 AM
Hello,

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
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
0
Yelena
Top achievements
Rank 1
answered on 26 Jun 2013, 06:43 PM
Hello,Boyan!

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

 

 

 

 

 

0
Boyan Dimitrov
Telerik team
answered on 28 Jun 2013, 05:44 PM
Hello,

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
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
0
Yelena
Top achievements
Rank 1
answered on 28 Jun 2013, 06:59 PM
Hello, Boyan!
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




0
Boyan Dimitrov
Telerik team
answered on 03 Jul 2013, 01:51 PM
Hello,

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
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Tags
Scheduler
Asked by
Yelena
Top achievements
Rank 1
Answers by
Boyan Dimitrov
Telerik team
Yelena
Top achievements
Rank 1
Share this question
or