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

OccurrenceDelete not firing

5 Answers 110 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Ilya
Top achievements
Rank 1
Ilya asked on 21 Nov 2011, 11:05 PM
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


5 Answers, 1 is accepted

Sort by
0
Plamen
Telerik team
answered on 25 Nov 2011, 07:37 AM
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
0
Ilya
Top achievements
Rank 1
answered on 28 Nov 2011, 03:03 PM
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
0
Plamen
Telerik team
answered on 01 Dec 2011, 03:58 PM
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
0
Ilya
Top achievements
Rank 1
answered on 01 Dec 2011, 04:00 PM
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?
0
Peter
Telerik team
answered on 06 Dec 2011, 11:31 AM
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
Tags
Scheduler
Asked by
Ilya
Top achievements
Rank 1
Answers by
Plamen
Telerik team
Ilya
Top achievements
Rank 1
Peter
Telerik team
Share this question
or