Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[Expand]General Information
[Collapse]WinForms Controls
  Prerequisites
 [Expand]What's Installed
 [Expand]Build an Application
 [Collapse]Controls and Libraries
  [Expand]Forms and User Controls
  [Expand]Messages, Notifications and Dialogs
  [Expand]Editors and Simple Controls
  [Expand]Ribbon, Bars and Menu
  [Expand]Application UI Manager
  [Expand]Docking Library
  [Expand]Data Grid
  [Expand]Vertical Grid
  [Expand]Pivot Grid
  [Expand]Tree List
  [Expand]Chart Control
  [Expand]Diagrams
  [Expand]Gauges
  [Expand]Map Control
  [Collapse]Scheduler
   [Expand]Product Information
   [Expand]Getting Started
   [Collapse]Fundamentals
    [Expand]Scheduler Elements
    [Expand]Scheduler Structure
    [Expand]Appointments
     Resources for Appointments
    [Expand]Views
    [Expand]Data Binding
    [Collapse]Mappings
      Appointment Mappings
      Resource Mappings
      Dependency Mappings
      How to: Set Mappings
      Required Fields
      Custom Fields
      Mapping Converters
    [Expand]Supported Formats
    [Expand]Services
    [Expand]Time Zones
     Printing
    [Expand]Scheduler Reporting
   [Expand]Visual Elements
   [Expand]Design-Time Features
   [Expand]Examples
   [Expand]End-User Capabilities
   [Expand]Member Tables
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]Spell Checker
  [Expand]Form Layout Managers
  [Expand]Navigation Controls
  [Expand]Printing-Exporting
  [Expand]PDF Viewer
   Reporting
  [Expand]Snap
  [Expand]TreeMap Control
 [Expand]Common Features
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Document Server
[Expand]Reporting
[Expand]Report Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

Mapping Converters

Mapping converters allow you to apply custom logic to mapping.

Expanded Overview

To associate a value converter with a mapping, create a class that implements the ISchedulerMappingConverter interface and subsequently implement the Convert and ConvertBack methods. Converters can change data from one type to another, translate data based on additional information, or change format in which the data are stored.

The data are propagated forth and back between the property, default mapping method and a data source field. You can insert a converter in place of default mapping method, between the property and the default mapping method or between the default mapping method and the data source field. Converter position in that propagation chain is defined by the MappingConversionBehavior enumeration.

The converter processing order is illustrated in the following image.

Expanded Available Converters

You can assign converters and specify the processing order using the properties listed in the following table.

Mapping

Converter

Behavior

AppointmentMappingInfo.AllDay AppointmentMappingInfo.AllDayConverter AppointmentMappingInfo.AllDayConversionBehavior
AppointmentMappingInfo.AppointmentId AppointmentMappingInfo.AppointmentIdConverter AppointmentMappingInfo.AppointmentIdConversionBehavior
AppointmentMappingInfo.Description AppointmentMappingInfo.DescriptionConverter AppointmentMappingInfo.DescriptionConversionBehavior
AppointmentMappingInfo.End AppointmentMappingInfo.EndConverter AppointmentMappingInfo.EndConversionBehavior
AppointmentMappingInfo.Label AppointmentMappingInfo.LabelConverter AppointmentMappingInfo.LabelConversionBehavior
AppointmentMappingInfo.Location AppointmentMappingInfo.LocationConverter AppointmentMappingInfo.LocationConversionBehavior
AppointmentMappingInfo.OriginalOccurrenceEnd AppointmentMappingInfo.OriginalOccurrenceEndConverter AppointmentMappingInfo.OriginalOccurrenceEndConversionBehavior
AppointmentMappingInfo.OriginalOccurrenceStart AppointmentMappingInfo.OriginalOccurrenceStartConverter AppointmentMappingInfo.OriginalOccurrenceStartConversionBehavior
AppointmentMappingInfo.PercentComplete AppointmentMappingInfo.PercentCompleteConverter AppointmentMappingInfo.PercentCompleteConversionBehavior
AppointmentMappingInfo.RecurrenceInfo AppointmentMappingInfo.RecurrenceInfoConverter AppointmentMappingInfo.RecurrenceInfoConversionBehavior
AppointmentMappingInfo.ReminderInfo AppointmentMappingInfo.ReminderInfoConverter AppointmentMappingInfo.ReminderInfoConversionBehavior
AppointmentMappingInfo.ResourceId AppointmentMappingInfo.ResourceIdConverter AppointmentMappingInfo.ResourceIdConversionBehavior
AppointmentMappingInfo.Start AppointmentMappingInfo.StartConverter AppointmentMappingInfo.StartConversionBehavior
AppointmentMappingInfo.Status AppointmentMappingInfo.StatusConverter AppointmentMappingInfo.StatusConversionBehavior
AppointmentMappingInfo.Subject AppointmentMappingInfo.SubjectConverter AppointmentMappingInfo.SubjectConversionBehavior
AppointmentMappingInfo.TimeZoneId AppointmentMappingInfo.TimeZoneIdConverter AppointmentMappingInfo.TimeZoneIdConversionBehavior
AppointmentMappingInfo.Type AppointmentMappingInfo.TypeConverter AppointmentMappingInfo.TypeConversionBehavior
ResourceMappingInfo.Caption ResourceMappingInfo.CaptionConverter ResourceMappingInfo.CaptionConversionBehavior
ResourceMappingInfo.Color ResourceMappingInfo.ColorConverter ResourceMappingInfo.ColorConversionBehavior
ResourceMappingInfo.Id ResourceMappingInfo.IdConverter ResourceMappingInfo.IdConversionBehavior
ResourceMappingInfo.Image ResourceMappingInfo.ImageConverter ResourceMappingInfo.ImageConversionBehavior
ResourceMappingInfo.ParentId ResourceMappingInfo.ParentIdConverter ResourceMappingInfo.ParentIdConversionBehavior

Show Me

A complete sample project is available in the DevExpress Code Examples database at http://www.devexpress.com/example=T497864.

How would you rate this topic?​​​​​​​