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

Deleting only this ocurrence returns wrong exception date

3 Answers 69 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Oleg
Top achievements
Rank 1
Oleg asked on 03 Jan 2012, 04:47 PM
Hi,
     I am trying to delete only a single occurrence within a recurring appointment in the ASP RadScheduler. If I click on any ocurrence past the second one, the AppointmentUpdate event returns a ModifiedAppointment object whose RecurrenceRule property contains the date of the second ocurrence. So what winds up happening is that if I click on the third, or fourth or any ocurrence beyond the second, the second ocurrence winds up getting deleted. Am I doing something wrong or is this an issue? If it is an issue, is there a fix or a work-around?

Thanks,
Oleg Litvak

3 Answers, 1 is accepted

Sort by
0
Ivana
Telerik team
answered on 04 Jan 2012, 05:39 PM
Hello Oleg,

When alter / delete an appointment which belong to a recurring series, an exception for that appointment is created. More information about this could be found at the following link: RadScheduler / Working with Recurring Appointments.

Could you check the online demos to see if the same behavior is replicated in there, too?

Kind regards,
Ivana
the Telerik team
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 their blog feed now
0
Oleg
Top achievements
Rank 1
answered on 06 Jan 2012, 04:40 PM
Hi Ivana,
      The demo site does not show the same problem. So it must be something in my code. Here is a snippet of my code:

Protected Sub RadScheduler2_AppointmentUpdate(ByVal sender As Object, ByVal e As Telerik.Web.UI.AppointmentUpdateEventArgs) Handles RadScheduler2.AppointmentUpdate
       SaveFacilityReservation(e.ModifiedAppointment)
End Sub
 
Private Sub SaveFacilityReservation(ByVal appt As Appointment)
     If appt.RecurrenceRule.Length > 0 Then
          Dim rec As RecurrenceRule = RecurrenceRule.TryParse(appt.RecurrenceRule)
            If appt.ID > 0 And appt.RecurrenceState = RecurrenceState.Exception Then
                 For Each exc As Date In rec.Exceptions
                      'Delete each facility reservation corresponding to each exception
                 Next
            End If
     End If
End Sub
Should I be using a different way of parsing the appointment exceptions?

Thanks,
Oleg
0
Ivana
Telerik team
answered on 11 Jan 2012, 02:00 PM
Hello Oleg,

The video below shows how the RadScheduler behaves when deleting recurring appointments: RadScheduler / Recurring Appointments. Could you test if this behavior can be replicated if you remove the custom code which handles the recurring appointments deleting?

If the issues still persist, you can isolate the problem in a sample project and send it to us. Or, send us a live URL to your website.

Kind regards,
Ivana
the Telerik team
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 their blog feed now
Tags
Scheduler
Asked by
Oleg
Top achievements
Rank 1
Answers by
Ivana
Telerik team
Oleg
Top achievements
Rank 1
Share this question
or