PersistentObjectCancelEventArgs Class
Provides data for the persistent object events of the SchedulerStorage that have a cancel option.
Namespace: DevExpress.XtraScheduler
Assembly: DevExpress.XtraScheduler.v18.1.Core.dll
Declaration
public class PersistentObjectCancelEventArgs :
PersistentObjectEventArgs
Public Class PersistentObjectCancelEventArgs
Inherits PersistentObjectEventArgs
Related API Members
PersistentObjectCancelEventArgs is the data class for the following events:
Remarks
The PersistentObjectCancelEventArgs class introduces a PersistentObjectCancelEventArgs.Cancel property which allows the operation associated with the corresponding event handler to be canceled. The processed persistent object is identified by the PersistentObjectEventArgs.Object property
An instance of the PersistentObjectCancelEventArgs class with appropriate settings is automatically created and passed to the corresponding event’s handler.
Related GitHub Examples
The following code snippets (auto-collected from DevExpress Examples) contain references to the PersistentObjectCancelEventArgs class.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.
void schedulerStorage1_AppointmentChanging(object sender, PersistentObjectCancelEventArgs e) {
Appointment apt = (Appointment)e.Object;
private void schedulerStorage1_AppointmentChanging(object sender, PersistentObjectCancelEventArgs e)
{
how-to-split-appointments-into-groups-e3792/CS/MainWindow.xaml.cs#L23
void Storage_AppointmentChanging(object sender, PersistentObjectCancelEventArgs e) {
Appointment apt = (Appointment)e.Object;
#region #AppointmentInserting
private void SchedulerStorage1_AppointmentInserting(object sender, PersistentObjectCancelEventArgs e) {
if (((Appointment)e.Object).Start < DateTime.Now) e.Cancel = true;
winforms-schedulercontrol-api-t224044/CS/SchedulerAPISample/CodeExamples/AppointmentEvents.cs#L16
#region #@AppointmentChangingEvent
private static void Storage_AppointmentChanging(object sender, PersistentObjectCancelEventArgs e) {
object busyKey = ((SchedulerDataStorage)sender).Appointments.Statuses.GetByType(AppointmentStatusType.Busy).Id;
Private Sub schedulerStorage1_AppointmentChanging(ByVal sender As Object, ByVal e As PersistentObjectCancelEventArgs)
Dim apt As Appointment = CType(e.Object, Appointment)
Private Sub schedulerStorage1_AppointmentChanging(ByVal sender As Object, ByVal e As PersistentObjectCancelEventArgs) Handles schedulerStorage1.AppointmentChanging
isDragging = False
how-to-split-appointments-into-groups-e3792/VB/MainWindow.xaml.vb#L29
Private Sub Storage_AppointmentChanging(ByVal sender As Object, ByVal e As PersistentObjectCancelEventArgs)
Dim apt As Appointment = CType(e.Object, Appointment)
#Region "#AppointmentInserting"
Private Sub SchedulerStorage1_AppointmentInserting(ByVal sender As Object, ByVal e As PersistentObjectCancelEventArgs)
If CType(e.Object, Appointment).Start < Date.Now Then
winforms-schedulercontrol-api-t224044/VB/SchedulerAPISample/CodeExamples/AppointmentEvents.vb#L14
#Region "#@AppointmentChangingEvent"
Private Shared Sub Storage_AppointmentChanging(ByVal sender As Object, ByVal e As PersistentObjectCancelEventArgs)
Dim busyKey As Object = DirectCast(sender, SchedulerDataStorage).Appointments.Statuses.GetByType(AppointmentStatusType.Busy).Id