Skip to main content

DxSchedulerAppointmentMappings Class

Specifies how appointment fields from the data source are mapped to appointment properties in the Scheduler.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.1.dll

NuGet Package: DevExpress.Blazor

Declaration

public class DxSchedulerAppointmentMappings :
    DxSchedulerMappingsBase

The following members return DxSchedulerAppointmentMappings objects:

Remarks

The Scheduler works with the DxSchedulerDataStorage object that contains source data for the following Scheduler persistent objects:

The DxSchedulerDataStorage defines property mappings that map data fields to persistent object properties. This class also includes API to retrieve persistent objects and to manage them.

Scheduler and Data Storage - Scheme

The DxSchedulerAppointmentMappings object allows you to incorporate information on appointment items into the Scheduler. Follow the steps below to do this:

  1. In the Razor @code block, use the constructor without parameters to create a DxSchedulerDataStorage object.
  2. Declare a class (for instance, Appointment) that stores appointment options.
  3. Create a collection of status source objects (Appointment class instances) and define their options.
  4. Assign the newly created collection to the storage’s AppointmentsSource property to fill the storage with a collection of data objects.
  5. Assign a new DxSchedulerAppointmentMappings object to the DxSchedulerDataStorage.AppointmentMappings property. In this object, map the data source fields to appointment properties.
 <DxScheduler StartDate="@DateTime.Today" DataStorage="@DataStorage">
    <DxSchedulerWeekView ShowWorkTimeOnly="true"></DxSchedulerWeekView>
</DxScheduler>

@code {
    DxSchedulerDataStorage DataStorage = new DxSchedulerDataStorage() {
        AppointmentsSource = AppointmentCollection.GetAppointments(),
        AppointmentMappings = new DxSchedulerAppointmentMappings() {
            Start = "StartDate",
            End = "EndDate",
            Subject = "Caption",
            LabelId = "Label",
            StatusId = "Status",
        }
    };
}

Scheduler Appointment Mappings

You can also map source object custom fields to a scheduler item’s custom properties. To do this, use the CustomFieldMappings property.

Run Demo: Scheduler - View Types

Run Demo: Scheduler - Recurring Appointments

Inheritance

Object
DevExpress.Blazor.Scheduler.Internal.BindableBase
DxSchedulerMappingsBase
DxSchedulerAppointmentMappings
See Also