DxSchedulerAppointmentMappings Class
Specifies how appointment fields from the data source are mapped to appointment properties in the Scheduler.
Namespace: DevExpress.Blazor
Assembly: DevExpress.Blazor.v22.2.dll
NuGet Package: DevExpress.Blazor
Declaration
public class DxSchedulerAppointmentMappings :
DxSchedulerMappingsBase
Related API Members
The following members return DxSchedulerAppointmentMappings objects:
Remarks
The DxSchedulerDataStorage
object is an essential element required for the DxScheduler component operation. It contains source data for the following Scheduler persistent objects:
- Appointments
- Labels
- Status items
- Resources
The DxSchedulerAppointmentMappings
object allows you to incorporate information on appointments into the component. Follow the steps below to do this:
- In the Razor
@code
block, use the constructor without parameters to create a DxSchedulerDataStorage object. - Use the DxSchedulerDataStorage.AppointmentsSource property to fill the storage with a collection of data objects.
- Create a
DxSchedulerAppointmentMappings
object and map data source fields to appointment properties. - 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",
}
};
}
You can also map source object custom fields to a scheduler item’s custom properties. To do this, use the the CustomFieldMappings property.