Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[Expand]General Information
[Expand]WinForms Controls
[Collapse]ASP.NET Controls and MVC Extensions
 [Expand]Prerequisites
 [Expand]What's Installed
 [Expand]Common Concepts
 [Collapse]ASP.NET WebForms Controls
  [Expand]Reporting
  [Expand]Chart Control
  [Expand]Grid View
  [Expand]Card View
  [Expand]Vertical Grid
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]Image and Data Browsing
  [Expand]Docking and Popups
  [Expand]Site Navigation and Layout
  [Expand]File Management
  [Expand]Multi-Use Site Controls
  [Collapse]Scheduler
   [Expand]Product Information
    Getting Started
   [Expand]Fundamentals
   [Expand]Concepts
   [Expand]Visual Elements
   [Collapse]Design-Time Features
     Smart Tag
     Mappings Wizards
   [Expand]Examples
   [Expand]End-User Capabilities
   [Expand]Member Tables
  [Expand]HTML Editor
  [Expand]Pivot Grid
  [Expand]Tree List
  [Expand]Gauges
  [Expand]Data Editors
  [Expand]Spell Checker
  [Expand]Query Builder
 [Expand]ASP.NET MVC Extensions
 [Expand]Localization
 [Expand]Redistribution and Deployment
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core 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]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

Mappings Wizards

The task of establishing mappings between the fields in a data table and appointment's properties is tedious, and may cause obscure application errors due to typos in field names or incorrect relations. Mappings Wizards help you create mappings with minimal hassle, and in less time.

Mappings Wizards are available at design-time if the Scheduler control is bound to the System.Web.UI.WebControls.SqlDataSource or the System.Web.UI.WebControls.AccessDataSource data controls.

The ASPxScheduler control provides two wizards - one to map appointment fields, and another for resources. The wizards can be invoked by clicking the control's smart tag (as illustrated in the picture) or via the ellipsis button of the Mappings item in a Storage-Appointments or Storage-Resources branch in the property pages.

Click the Generate button. The built-in algorithm attempts to guess which field matches a particular appointment property. In most cases the resulting mappings are correct, although you are strongly advised to check the mappings to avoid mistakes. You can clear all mappings, generate them as suggested by the Wizard and modify them if needed, by selecting fields in the drop-downs. After you click Next, the Wizard validates mappings and displays a diagnostic message.

The second page of the Wizard allows you to create mappings for custom fields, i.e., fields that are not included in a standard appointment (resource) property set. Note that the establishment of a custom mapping does not result in modifications being made in an appointment editing form or elsewhere - it's up to you to manage these fields.

The third page of the Appointment Wizard addresses the synchronization of the appointment ID for the newly created or updated appointment. The check box represents the ASPxAppointmentStorage.AutoRetrieveId property. It is valid for the System.Web.UI.WebControls.SqlDataSource, the System.Web.UI.WebControls.AccessDataSource and the System.Web.UI.WebControls.ObjectDataSource controls. For other data source types, it is ignored.

When all settings are done, you can use the built-in capabilities of the Wizards to validate mappings. Click the Check Mappings smart tag to get either the enthusiastic "Mappings are correct!" message or a more descriptive one, as illustrated below:

This diagnostic message informs you that:

  1. The mapping for the mandatory property Start is not specified.
  2. There are two properties (AppointmentId, ResourceId) mapped to the same data field (UniqueID), which is not allowed.

Note that incorrect mappings may lead to errors that are difficult to diagnose, so be sure to double check them. Review the Data Table Structure topic for data type requirements.

Note

If you use a System.Web.UI.WebControls.ObjectDataSource in your project, you should manually set mappings in code behind. By design, the Mappings Wizard does not get properties from ObjectDataSource objects.

Expanded See Also

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