Skip to main content
A newer version of this page is available. .

DxScheduler.AppointmentUpdated Event

Fires after an updated appointment is saved to the AppointmentsSource object.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v23.1.dll

NuGet Package: DevExpress.Blazor

Declaration

[Parameter]
public EventCallback<DxSchedulerAppointmentItem> AppointmentUpdated { get; set; }

Parameters

Type Description
DxSchedulerAppointmentItem

A DxSchedulerAppointmentItem object that stores an updated appointment.

Remarks

Use the AppointmentUpdated event to access an updated appointment after it has been saved to the AppointmentsSource object.

Note

To cancel an appointment update or access the updated appointment and change it (if needed), use the AppointmentUpdating event.

The code below uses the AppointmentUpdated event to update an object in a data source after it was updated and saved to the AppointmentsSource object.

<DxScheduler DataStorage="..."
             AppointmentUpdated="@AppointmentUpdated">
    <DxSchedulerDayView ShowWorkTimeOnly="true"></DxSchedulerDayView>
</DxScheduler>

@code {
    ...

    async Task AppointmentUpdated(DxSchedulerAppointmentItem e) {
        MedicalAppointments updatedItem = e.SourceObject as MedicalAppointments;
        var myContent = JsonSerializer.Serialize(updatedItem);
        var request = new HttpRequestMessage(HttpMethod.Put, fullWebAPIUrl + Convert.ToInt32(e.Id));
        request.Content = new StringContent(myContent, Encoding.Unicode, "application/json");
        var response = await Http.SendAsync(request);
    }
}    

View Example: Scheduler for Blazor - How to implement CRUD operations with a Web API Service

See Also