Hello,
I have a custom appointment class where I am setting the AllowDelete property to false.
I have set up the mapping like so:
When I only this appointment in the edit dialog, the "Delete" button is disabled as expected.
But, when I press the "Del" key on the RadScheduler itself, the AllowDelete is ignored and the appointment is deleted.
I have worked around it by checking for the AllowDelete state myself in the AppointmentDeleting event:
But this seems like a bug.
I have looked at the RadScheduler source code and can see no reference to AllowDelete in RadScheduler.cs.
I do see the AllowDelete handling in EditRecurrenceDialog.cs to disable the Delete button.
Thanks.
I have a custom appointment class where I am setting the AllowDelete property to false.
I have set up the mapping like so:
appointmentMappingInfo.AllowDelete = "AllowDelete"
When I only this appointment in the edit dialog, the "Delete" button is disabled as expected.
But, when I press the "Del" key on the RadScheduler itself, the AllowDelete is ignored and the appointment is deleted.
I have worked around it by checking for the AllowDelete state myself in the AppointmentDeleting event:
Private Sub ArcoriScheduler_AppointmentDeleting(ByVal sender As Object, ByVal e As Telerik.WinControls.UI.SchedulerAppointmentCancelEventArgs) Handles Me.AppointmentDeleting
If e.Appointment.AllowDelete Then
' The RadScheduler does not prompt for series or instance when deleting an appointment with recurrence,
' which is how Outlook behaves: http://www.telerik.com/support/pits.aspx#/public/winforms/11810
If e.Appointment.MasterEvent IsNot Nothing Then
Dim confirmDlg As New RecurringAppointmentDeleteDialog
confirmDlg.AppointmentName = e.Appointment.Summary
Dim result As DialogResult = confirmDlg.ShowDialog()
If result = DialogResult.OK Then
If confirmDlg.DeleteType = RecurringAppointmentDeleteDialog.eDeleteType.Series Then
Me.Appointments.Remove(e.Appointment.MasterEvent)
e.Cancel = True
End If
Else
e.Cancel = True
End If
End If
Else
e.Cancel = True
End If
But this seems like a bug.
I have looked at the RadScheduler source code and can see no reference to AllowDelete in RadScheduler.cs.
I do see the AllowDelete handling in EditRecurrenceDialog.cs to disable the Delete button.
Thanks.