Back to Devexpress

Mappings

wpf-119493-controls-and-libraries-scheduler-data-binding-mappings.md

latest11.8 KB
Original Source

Mappings

  • Apr 01, 2021
  • 4 minutes to read

Overview

When you bind the Scheduler to a data source, you need to map appointments, resources, labels and statuses properties to data source fields. The names of the database fields are usually fixed, and you cannot change them. Mappings are used to adjust the Scheduler data model to the existing data model.

The SchedulerControl uses Mapping instances to connect the object properties with the corresponding data fields. Use the Mapping.Converter property to register a value converter for a custom storage format. Review the Mapping Converters topic for more information.

You can define Custom Mappings - any number of mappings to data source fields that are not used by the Scheduler itself. The content of these fields is available using the SourceObjectContainer.CustomFields property of the AppointmentItem, ResourceItem, AppointmentLabelItem and AppointmentStatusItem objects. To specify a custom mapping, create a CustomFieldMapping instance and add it to the MappingsBase.CustomFieldMappings collection. To learn more, see the Custom Fields document.

Appointment Mappings

MappingDescription
SchedulerItemBaseMappings.AllDaySpecifies the mapping that binds the appointment’s AllDay property to the data source field.
AppointmentMappings.DescriptionSpecifies the mapping that binds the appointment’s AppointmentItem.Description property to the data source field.
AppointmentMappings.End (required mapping)Specifies the mapping that binds the appointment’s SchedulerItemBase.End property to the data source field.
AppointmentMappings.IdGets or sets the mapping that binds the appointment’s SourceObjectContainer.Id property to the data source field.
AppointmentMappings.LocationSpecifies the mapping that binds the appointment’s AppointmentItem.Location property to the data source field.
AppointmentMappings.LabelIdSpecifies the mapping that binds the appointment’s AppointmentItem.LabelId property to the data source field.
AppointmentMappings.QueryStartSpecifies the mapping that binds the appointment’s SchedulerItemBase.QueryStart property to the data source field.
AppointmentMappings.QueryEndSpecifies the mapping that binds the appointment’s SchedulerItemBase.QueryEnd property to the data source field.
AppointmentMappings.RecurrenceInfo (required mapping for recurring appointments)Gets or sets the mapping that binds the appointment’s AppointmentItem.RecurrenceInfo property to the data source field.
AppointmentMappings.ReminderGets or sets the mapping that binds the appointment’s AppointmentItem.Reminder property to the data source field.
AppointmentMappings.ResourceIdSpecifies the mapping that binds the appointment’s SchedulerItemBase.ResourceId and AppointmentItem.ResourceIds properties to the data source field.
AppointmentMappings.Start (required mapping)Specifies the mapping that binds the appointment’s SchedulerItemBase.Start property to the data source field.
AppointmentMappings.StatusIdGets or sets the mapping that binds the appointment’s AppointmentItem.StatusId property to the data source field.
AppointmentMappings.SubjectSpecifies the mapping that binds the appointment’s AppointmentItem.Subject property to the data source field.
AppointmentMappings.TimeZoneIdSpecifies the mapping that binds the appointment’s SchedulerItemBase.TimeZoneId property to the data source field.
AppointmentMappings.Type (required mapping for recurring appointments)Gets or sets the mapping that binds the appointment’s AppointmentItem.Type property to the data source field.

Appointment Label Mappings

MappingDescription
AppointmentLabelMappings.BrushGets or sets the mapping that binds the appointment label’s AppointmentLabelItem.Brush property to the data source field.
AppointmentLabelMappings.BrushNameGets or sets the mapping that binds the appointment label’s AppointmentLabelItem.BrushName property to the data source field.
AppointmentLabelMappings.BrushSavingTypeSpecifies the format type used to store the brush information.
AppointmentLabelMappings.CaptionGets or sets the mapping that binds the appointment label’s AppointmentLabelItem.Caption property to the data source.
AppointmentLabelMappings.IdGets or sets the mapping that binds the appointment label’s SourceObjectContainer.Id property to the data source.

Appointment Status Mappings

MappingDescription
AppointmentStatusMappings.BrushSpecifies the mapping that binds the appointment label’s AppointmentStatusItem.Brush property to the data source field.
AppointmentStatusMappings.BrushNameGets or sets the mapping that binds the appointment label’s AppointmentStatusItem.BrushName property to the data source field.
AppointmentStatusMappings.BrushSavingTypeSpecifies the type of format used to store the brush information.
AppointmentStatusMappings.CaptionSpecifies the mapping that binds the appointment status’s AppointmentStatusItem.Caption property to the data source field.
AppointmentStatusMappings.IdSpecifies the mapping that binds the appointment status’s SourceObjectContainer.Id property to the data source field.

Resource Mappings

MappingDescription
ResourceMappings.BrushSpecifies the mapping that binds the resource’s ResourceItem.Brush property to the data source field.
ResourceMappings.BrushNameSpecifies the mapping that binds the resource’s ResourceItem.BrushName property to the data source field.
ResourceMappings.BrushSavingTypeSpecifies the format type used to store the brush information.
ResourceMappings.CaptionSpecifies the mapping that binds the resource’s ResourceItem.Caption property to the data source field.
ResourceMappings.IdSpecifies the mapping that binds the resource’s SourceObjectContainer.Id property to the data source field.
ResourceMappings.VisibleGets or sets the mapping that binds the appointment’s ResourceItem.Visible property to the data source field.

Time Region Mappings

MappingDescription
TimeRegionMappings.BrushGets or sets the mapping that binds the time region’s TimeRegionItem.Brush property to the data source.
TimeRegionMappings.BrushNameGets or sets the mapping that binds the time region’s TimeRegionItem.BrushName property to the data source.
TimeRegionMappings.BrushSavingTypeSpecifies the type of format used to store the brush information.
TimeRegionMappings.TypeGets or sets the mapping that binds the time region’s TimeRegionItem.Type property to the data source.