DxScheduler.AppointmentUpdated Event
Fires after an updated appointment is saved to the AppointmentsSource object.
Namespace: DevExpress.Blazor
Assembly: DevExpress.Blazor.v22.2.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="async (e) => await AppointmentUpdated(e)">
<DxSchedulerDayView ShowWorkTimeOnly="true"></DxSchedulerDayView>
</DxScheduler>
@code {
async Task AppointmentUpdated(DxSchedulerAppointmentItem e) {
MedicalAppointments updatedItem = (DataStorage.AppointmentsSource as List<MedicalAppointments>).Where(m => m.Id == Convert.ToInt32(e.Id)).FirstOrDefault();
await Http.PutJsonAsync("https://MyWebService.com/api/MedicalAppointments/" + Convert.ToInt32(e.Id), updatedItem);
}
}