Skip to main content

PersistentObjectCancelEventArgs Class

Provides data for the persistent object events of the SchedulerStorage that have a cancel option.

Namespace: DevExpress.XtraScheduler

Assembly: DevExpress.XtraScheduler.v14.2.Core.dll

#Declaration

public class PersistentObjectCancelEventArgs :
    PersistentObjectEventArgs

#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

Note, that PersistentObjectCancelEventArgs objects are automatically created, initialized and passed to corresponding event handlers.

#Examples

This example demonstrates how to use the SchedulerStorage.FilterResource event to filter resources shown within a Scheduler Control based on specified conditions. Specifically, the code below shows only the first three resources.

using DevExpress.XtraScheduler;
// ...

private void SchedulerStorage_FilterResource(object sender, PersistentObjectCancelEventArgs e) {
    Resource res = (Resource)e.Object;
    // Filter the first three resources in a collection.
    e.Cancel = schedulerControl1.Storage.ResourceStorage.Items.IndexOf(res) > 2;
}

#Inheritance

Object
EventArgs
PersistentObjectEventArgs
PersistentObjectCancelEventArgs
See Also