DxSchedulerDataStorage.GetAppointments(DxSchedulerDateTimeRange) Method

Retrieves the collection of appointments that belong to the specified time interval.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v21.1.dll

Declaration

public IEnumerable<DxSchedulerAppointmentItem> GetAppointments(
    DxSchedulerDateTimeRange interval
)

Parameters

Name Type Description
interval DxSchedulerDateTimeRange

The time interval.

Returns

Type Description
IEnumerable<DxSchedulerAppointmentItem>

The appointment collection.

Remarks

The GetAppointments method returns standard and recurrent appointments that belong to the specified time interval. If an appointment’s time interval partially overlaps the specified interval, this appointment is also included in the resulting collection.

 <DxScheduler StartDate="@DateTime.Today" DataStorage="@DataStorage">
    <DxSchedulerWeekView ShowWorkTimeOnly="true"></DxSchedulerWeekView>
</DxScheduler>

@code {
    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"
        }
    };

    // ...
    void GetMyAppointments() {
        DxSchedulerDateTimeRange range = new DxSchedulerDateTimeRange(DateTime.Today, 
          DateTime.Today.AddDays(7));
        var appointments = DataStorage.GetAppointments(range);
    }
}
See Also