Skip to main content

SchedulerAppointmentOperationEventArgs.Cancel Property

Specifies whether the corresponding appointment operation (addition, update or removal) should be canceled.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v22.1.dll


public bool Cancel { get; set; }

Property Value

Type Description

true, if the corresponding operation should be canceled; otherwise, false.


The Cancel property allows you to cancel the corresponding appointment operation (addition, update or removal) when it starts. If the operation, for example, AppointmentInserting is canceled, the similar post-operation event, AppointmentInserted, is not raised.

The code below uses the Cancel property to restrict non-Admin users to add appointments to the DxScheduler.

<DxScheduler StartDate="@(new DateTime(2018, 10, 10))"
             AppointmentInserting="(e) => AppointmentInserting(e)">

@if (PopupVisible) {
    <DxPopup HeaderText="Warning" CloseButtonClick="@(() => PopupVisible = false)">
        <p>You are not allowed to add new appointments to the scheduler. Please contact your system administrator for details.</p>

@code {
    bool popupVisible = false;
    bool PopupVisible { get => popupVisible; set { popupVisible = value; InvokeAsync(StateHasChanged); } }

  void AppointmentInserting(SchedulerAppointmentOperationEventArgs e) {
      if (currentUser.Role != "Admin") {
          e.Cancel = true;
          PopupVisible = true;
See Also