Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

DxSchedulerDataStorage.GetAppointments(DxSchedulerDateTimeRange) Method

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

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.2.dll

NuGet Package: DevExpress.Blazor

#Declaration

#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