corelibraries-devexpress-dot-xtrascheduler-dot-persistentobjectcanceleventargs.md
Gets or sets whether to cancel the operation.
Namespace : DevExpress.XtraScheduler
Assembly : DevExpress.XtraScheduler.v25.2.Core.dll
NuGet Package : DevExpress.Scheduler.Core
public bool Cancel { get; set; }
Public Property Cancel As Boolean
| Type | Description |
|---|---|
| Boolean |
true to cancel the operation performed on the event; otherwise, false.
|
Set the Cancel parameter to true to cancel the processing of an event. Use this to cancel the loading, inserting or deleting of either appointments or resources.
The following code snippets (auto-collected from DevExpress Examples) contain references to the Cancel property.
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.
private void SchedulerStorage1_AppointmentInserting(object sender, PersistentObjectCancelEventArgs e) {
if (((Appointment)e.Object).Start < DateTime.Now) e.Cancel = true;
}
asp-net-web-forms-create-responsive-web-app/CS/ResponsiveWebApplication/Scheduler.aspx.cs#L35
if(ResourcesListBox.SelectedValues.Count == 0)
e.Cancel = true;
else {
If CType(e.Object, Appointment).Start < Date.Now Then
e.Cancel = True
End If
See Also
PersistentObjectCancelEventArgs Class