Skip to main content

DxScheduler.SelectedAppointment Property

Specifies the selected appointment.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.2.dll

NuGet Package: DevExpress.Blazor

Declaration

[Parameter]
public DxSchedulerAppointmentItem SelectedAppointment { get; set; }

Property Value

Type Description
DxSchedulerAppointmentItem

An object that stores the selected appointment.

Remarks

When a user selects an appointment (clicks it), the Scheduler displays a tooltip with additional information about this item.

Selected Appointment

To select an appointment from code, use the SelectedAppointment property. The following code selects an appointment with the specified identifier (1) when the Scheduler appears for the first time.

<DxScheduler DataStorage="@DataStorage" @bind-SelectedAppointment="@SelectedAppointment">
    <DxSchedulerWeekView ShowWorkTimeOnly="true" />
</DxScheduler>

@code {
  DxSchedulerAppointmentItem SelectedAppointment { get; set; }

  DxSchedulerDataStorage DataStorage = new DxSchedulerDataStorage() {
    AppointmentsSource = AppointmentCollection.GetAppointments(),
    AppointmentMappings = new DxSchedulerAppointmentMappings() {
      Type = "AppointmentType",
      Start = "StartDate",
      End = "EndDate",
      Subject = "Caption",
      AllDay = "AllDay",
      Location = "Location",
      Description = "Description",
      LabelId = "Label",
      StatusId = "Status",
      RecurrenceInfo = "Recurrence",
      Id = "Id"
    }
  };

  protected override void OnInitialized() {
    SelectedAppointment = DataStorage.GetAppointmentItemById(1);
  }
}

Handle the SelectedAppointmentChanged event to track selection changes.

Implements

See Also