Back to Devexpress

SchedulerAppointmentOperationEventArgs Class

blazor-devexpress-dot-blazor-a5e17c76.md

latest3.5 KB
Original Source

SchedulerAppointmentOperationEventArgs Class

Provides data for Scheduler events related to appointment operations.

Namespace : DevExpress.Blazor

Assembly : DevExpress.Blazor.v25.2.dll

NuGet Package : DevExpress.Blazor

Declaration

csharp
public class SchedulerAppointmentOperationEventArgs :
    CancelEventArgs

SchedulerAppointmentOperationEventArgs is the data class for the following events:

Remarks

The SchedulerAppointmentOperationEventArgs class includes the Appointment property that allows you to access the target appointment from event handlers.

You can also use the Cancel property in event handlers to cancel user actions. The following code snippet uses the Cancel property to restrict non-Admin users to add appointments to the DxScheduler.

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

@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>
    </DxPopup>
}

@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;
      }
  }
}

Inheritance

Object EventArgs CancelEventArgs SchedulerAppointmentOperationEventArgs SchedulerAppointmentDragBetweenResourcesEventArgs

SchedulerAppointmentFormClosingEventArgs

SchedulerAppointmentFormEventArgs

SchedulerAppointmentTooltipClosingEventArgs

SchedulerAppointmentTooltipShowingEventArgs

See Also

SchedulerAppointmentOperationEventArgs Members

DevExpress.Blazor Namespace