Skip to main content

How to: Create a Custom Field for an Appointment (legacy)

Note

You are viewing documentation for the legacy WPF Scheduler control. If you’re starting a new project, we strongly recommend that you use a new control declared in the DevExpress.Xpf.Scheduling namespace. If you decide to upgrade an existing project in order to switch to the updated scheduler control, see the Migration Guidelines document.

This example demonstrates how to add a custom field mapping for the non-standard appointment field via the CustomFieldMappings property of the AppointmentStorage object.

<dxsch:AppointmentStorage.CustomFieldMappings>
    <dxsch:SchedulerCustomFieldMapping 
        Member="CustomField1" 
        Name="Contact" 
        ValueType="String"/>
</dxsch:AppointmentStorage.CustomFieldMappings>

Custom field mappings should not use names from the list of the standard appointment properties (see the Appointment Mappings document) if the Scheduler operates in unbound mode. For example, the following mapping may result in incorrect appointment processing:

<dxsch:AppointmentStorage.CustomFieldMappings>
    <dxsch:SchedulerCustomFieldMapping Name="MyCustomIdField" Member="Id" ValueType="String" />
 </dxsch:AppointmentStorage.CustomFieldMappings>

For detailed information on how to substitute a standard Edit Appointment form with a custom form that allows end-users to edit custom appointment fields, refer to the Lesson 9 - Create a Custom Edit Appointment Form (legacy) example.