ComponentOne Scheduler for ASP.NET: Working with Scheduler for ASP.NET AJAX > Data and Databinding > Data Mappings

Data Mappings

You can bind to a datasoure and map it to the C1WebScheduleStorage using the Properties window. Each table and its columns are mapped to separate storage areas, and then appointments, categories, contacts, labels, resources, and the status of appointments can be loaded from the database.

In the Properties window, you can set DataSource and DataMember properties for all C1Schedule data storages. After setting the data source and data member, set the required and optional fields for the storage mapping.

All objects in the C1Schedule's object model are identified by either Id or Index property. To allow data to be correctly restored from your data sources, you should specify mapping either for the IdMapping or IndexMapping properties, which makes sense if you bind to your data storages of Resources, Labels, Contacts or Categories. C1Schedule saves only Ids or Indexes of these objects in the AppointmentStorage. If there is no mapping for IdMapping or IndexMapping, C1Schedule will not be able to identify the appointment's properties correctly in storages initialized by your data.

To map a data table to the C1Schedule control, first set either the Id mapping drop-down list to a Globally Unique Identifier (GUID) field or the Index mapping drop-down list to an Integer field.

WebAppointmentStorage Mappings

The following fields are available for mapping to the WebAppointmentStorage:

 

Mapping

Required/Optional

Data Type

Corresponding Mapping Property

Id

Optional

GUID

IdMapping

Index

Optional

Integer

IndexMapping

Properties

Optional

Text

AppointmentProperties

Body

Required

Text

BodyMapping

End

Required

Date/Time

EndMapping

Location

Required

Text

LocationMapping

Start

Required

Date/Time

StartMapping

Subject

Required

Text

SubjectMapping

WebCategoryStorage Mappings

The following fields are available for mapping to the WebCategoryStorage:

 

Mapping

Required/Optional

Data Type

Corresponding Mapping Property

Id

Optional

GUID

IdMapping

Index

Optional

Integer

IndexMapping

MenuCaption

Optional

Text

CaptionMapping

Text

Required

Text

TextMappingMapping

WebContactStorage Mappings

The following fields are available for mapping to the WebContactStorage:

 

Mapping

Required/Optional

Data Type

Corresponding Mapping Property

Id

Optional

GUID

IdMapping

Index

Optional

Integer

IndexMapping

Color

Optional

Text

ColorMapping

MenuCaption

Optional

Text

CaptionMapping

Text

Required

Text

TextMappingMapping

WebLabelStorage Mappings

The following fields are available for mapping to the WebLabelStorage:

 

Mapping

Required/Optional

Data Type

Corresponding Mapping Property

Id

Optional

GUID

IdMapping

Index

Optional

Integer

IndexMapping

Color

Optional

Text

ColorMapping

MenuCaption

Optional

Text

CaptionMapping

Text

Required

Text

TextMappingMapping

WebResourceStorage Mappings

The following fields are available for mapping to the WebResourceStorage:

 

Mapping

Required/Optional

Data Type

Corresponding Mapping Property

Id

Optional

GUID

IdMapping

Index

Optional

Integer

IndexMapping

Color

Optional

Text

ColorMapping

MenuCaption

Optional

Text

CaptionMapping

Text

Required

Text

TextMappingMapping

WebStatusStorage Mappings

The following fields are available for mapping to the WebStatusStorage:

 

Mapping

Required/Optional

Data Type

Corresponding Mapping Property

Id

Optional

GUID

IdMapping

Index

Optional

Integer

IndexMapping

Color

Optional

Text

ColorMapping

MenuCaption

Optional

Text

CaptionMapping

TextMapping

Required

Text

TextMappingMapping


Send comments about this topic to ComponentOne.
Copyright ComponentOne LLC. All rights reserved.