Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

SchedulerAppointmentOperationEventArgs.Appointment Property

Specifies the target appointment.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.2.dll

NuGet Package: DevExpress.Blazor

#Declaration

C#
public DxSchedulerAppointmentItem Appointment { get; set; }

#Property Value

Type Description
DxSchedulerAppointmentItem

A DxSchedulerAppointmentItem object that stores the target appointment.

#Remarks

Use the Appointment property to access the target appointment (that is modified or for which a tooltip/edit form is opened) and change some of its properties (if needed).

The following code snippet changes the added appointment’s Id property and then uses this property’s value to access the appointment after it has been added to the AppointmentsSource object.

Razor
<DxScheduler DataStorage="..."
             AppointmentInserting="(e) => AppointmentInserting(e)"
             AppointmentInserted="async (e) => await AppointmentInserted(e)">
    <DxSchedulerDayView ShowWorkTimeOnly="true"></DxSchedulerDayView>
</DxScheduler>


@code {

    void AppointmentInserting(SchedulerAppointmentOperationEventArgs e) {
        e.Appointment.Id = -1;
    }

    async Task AppointmentInserted(DxSchedulerAppointmentItem e) {
        MedicalAppointments insertedItem = (DataStorage.AppointmentsSource as List<MedicalAppointments>).Where(m => m.Id == -1).FirstOrDefault();
        insertedItem.Id = 0;
        await Http.PostJsonAsync<MedicalAppointments>("https://MyWebService.com/api/MedicalAppointments/", insertedItem);
    }
}    

Refer to the following topic for more information and an example: Managing Appointments in Code.

See Also