DxScheduler.SelectedAppointmentChanged Event
In This Article
Fires after the selected appointment is changed.
Namespace: DevExpress.Blazor
Assembly: DevExpress.Blazor.v24.2.dll
NuGet Package: DevExpress.Blazor
#Declaration
C#
[Parameter]
public EventCallback<DxSchedulerAppointmentItem> SelectedAppointmentChanged { get; set; }
#Parameters
Type | Description |
---|---|
Dx |
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 Selected
The following code uses the SelectedAppointmentChanged
event’s argument to access the selected appointment’s Subject.
Razor
<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