DxScheduler.SelectedAppointmentChanged Event
Fires after the selected appointment is changed.
Namespace: DevExpress.Blazor
Assembly: DevExpress.Blazor.v22.1.dll
NuGet Package: DevExpress.Blazor
Declaration
[Parameter]
public EventCallback<DxSchedulerAppointmentItem> SelectedAppointmentChanged { get; set; }
Parameters
Type | Description |
---|---|
DxSchedulerAppointmentItem | An object that stores the selected appointment. |
Remarks
The SelectedAppointmentChanged event occurs each time a user selects another appointment in the Scheduler.
Note
To select an appointment in code, use the SelectedAppointment property.
The following code uses the SelectedAppointmentChanged event’s argument to access the selected appointment’s Subject.
<p style="font-size: 18px">Selected appointment: "@SelectedSubject"</p>
<DxScheduler DataStorage="@DataStorage" SelectedAppointmentChanged="(e) => SelectedAppointmentChanged(e)">
<DxSchedulerWeekView ShowWorkTimeOnly="true" />
</DxScheduler>
@code {
string SelectedSubject;
// Create a DxSchedulerDataStorage object
void SelectedAppointmentChanged(DxSchedulerAppointmentItem e) {
// Check if a selected appointment exists
if (e != null) {
SelectedSubject = e.Subject;
}
}
}
See Also