OccurrenceDelete not firing

6 posts, 0 answers
  1. Ilya
    Ilya avatar
    67 posts
    Member since:
    Jul 2012

    Posted 21 Nov 2011 Link to this post

    My boss wants to do recurrence handling his way which is having an actual DB entry for each appointment. And they are being grouped by some common field in the DB. When those appointments are loaded I check for that field and if it's not 0 then I know that this is a recurrent appointment so in AppointmentDataBound event i do the following:

    If row.Item(10) = 0 Then
        e.Appointment.RecurrenceState = RecurrenceState.NotRecurring
    Else
        e.Appointment.RecurrenceState = RecurrenceState.Occurrence
    End If

    But when I click on the delete icon the OccurrenceDelete event does not fire. What should I do to fix it? Thanks


  2. Plamen
    Admin
    Plamen avatar
    3056 posts

    Posted 25 Nov 2011 Link to this post

    Hi Ilya,

    Thank you for contacting Telerik support.

    I could not quite understand you requirements.

    If I get it right you have normal (notRecurring ) appointments in the DB and you are trying to transform some of  them to occurrences using the appointmentDateBound event.

    Would you please confirm the scenario or explain it again if I didn't understand you right?

    Kind regards,
    Plamen Zdravkov
    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. Ilya
    Ilya avatar
    67 posts
    Member since:
    Jul 2012

    Posted 28 Nov 2011 Link to this post

    Hi Plamen,

    Yes this is correct. If the customer enters recurring parameters on the New Appointment form (including end date) the system will not use standard Telerik logic but will insert dozens or hundreds individual appointment rows in the database. And I use the code above to make scheduler see them as occurrences. But in this case delete occurrence and other events don't fire. Thanks
  4. Plamen
    Admin
    Plamen avatar
    3056 posts

    Posted 01 Dec 2011 Link to this post

    Hello Ilya,

    Unfortunately this kind of changes in the recurrence state are not supported and I will recommend you to use the usual AppointmentDelete event instead, without these changed in the AppointmentDataBound event.

    If you want to make the appointments to look as recurring , you may add an image as it is implemented in this demo.

    Hope this will be helpful.

    All the best,
    Plamen Zdravkov
    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
  5. Ilya
    Ilya avatar
    67 posts
    Member since:
    Jul 2012

    Posted 01 Dec 2011 Link to this post

    I can do it but then I will lose the popup asking me to make changes to this particular occurrence or the series. And I definitely need this functionality. Would it be possible to have the popup in this scenario?
  6. Peter
    Admin
    Peter avatar
    6637 posts

    Posted 06 Dec 2011 Link to this post

    Hi Ilya,

    It is not possible to have the popup dialog if the appointment is not actually from a recurring series.

    Could you please elaborate why you want to avoid utilizing the built-in recurrence engine which is designed for optimal data base storage and performance? Here is the help topic that explains in more details how it all works - http://www.telerik.com/help/aspnet-ajax/scheduler-working-with-recurring-appointments.html

    Kind regards,
    Peter
    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