PersistentObjectCancelEventArgs.Cancel Property
In This Article
Gets or sets whether the operation performed on the processed event should be canceled.
Namespace: DevExpress.XtraScheduler
Assembly: DevExpress.XtraScheduler.v14.2.Core.dll
#Declaration
#Property Value
Type | Description |
---|---|
Boolean | true to cancel the operation performed on the event; otherwise, false. |
#Remarks
Set the Cancel parameter to true to cancel the processing of an event. This can be used, for instance, to cancel the loading, inserting or deleting of either appointments or resources.
#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;
}
See Also