Back to Devexpress

SchedulerControl.CustomAllowAppointmentDelete Event

wpf-devexpress-dot-xpf-dot-scheduling-dot-schedulercontrol-5820a1ef.md

latest3.6 KB
Original Source

SchedulerControl.CustomAllowAppointmentDelete Event

Occurs when trying to delete an appointment.

Namespace : DevExpress.Xpf.Scheduling

Assembly : DevExpress.Xpf.Scheduling.v25.2.dll

NuGet Package : DevExpress.Wpf.Scheduling

Declaration

csharp
public event AppointmentItemOperationEventHandler CustomAllowAppointmentDelete
vb
Public Event CustomAllowAppointmentDelete As AppointmentItemOperationEventHandler

Event Data

The CustomAllowAppointmentDelete event's data class is AppointmentItemOperationEventArgs. The following properties provide information specific to this event:

PropertyDescription
AllowGets or sets whether performing a particular action is allowed.
AppointmentGets the appointment for which the element is raised. Inherited from AppointmentItemEventArgs.
RecurringGets whether the target appointment is recurring.

Remarks

Handle the CustomAllowAppointmentDelete event and sets its AppointmentItemOperationEventArgs.Allow property to specify a particular case when an end-user is allowed to delete the appointment. If you do not specify the required behavior manually, the SchedulerControl.AllowAppointmentDelete property manages whether deleting appointments is allowed.

Access the appointment to be deleted using the AppointmentItemEventArgs.Appointment property. To prevent the appointment from being deleted, set the AppointmentItemOperationEventArgs.Allow property to false.

Note

The SchedulerControl uses the CommandManager class to manage commands executed by the ribbon or context menu items. The RequerySuggested event is fired when any changes that can affect the command’s ability to execute (e.g., change of focus) have been made. It notifies the command that is should raise the CanExecuteChanged event, which makes the CustomAllowAppointmentDelete event to fire as well. This chain of events can occur involuntarily, so make sure that the event handler does not contain any code that may slow the application performance.

See Also

SchedulerControl Class

SchedulerControl Members

DevExpress.Xpf.Scheduling Namespace