Deleting only this ocurrence returns wrong exception date

4 posts, 0 answers
  1. Oleg
    Oleg avatar
    3 posts
    Member since:
    Jan 2012

    Posted 03 Jan 2012 Link to this post

    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
  2. Ivana
    Admin
    Ivana avatar
    657 posts

    Posted 04 Jan 2012 Link to this post

    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
  3. Oleg
    Oleg avatar
    3 posts
    Member since:
    Jan 2012

    Posted 06 Jan 2012 Link to this post

    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
  4. Ivana
    Admin
    Ivana avatar
    657 posts

    Posted 11 Jan 2012 Link to this post

    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
Back to Top