To fully appreciate the flexibility of the XtraScheduler™ Suite, you need to see what's happening inside - how appointments are represented internally, how they can be transferred to a scheduler from different sources and how they can be exported to external storage mediums. The great news for developers is that we don’t require that you change the manner in which you manage your data - each event is a record within the appropriate data storage container. As such, the data source for the XtraScheduler™ has the same format as data sources for any other data-aware control. Of course, you have alternatives when it comes to data binding. The control's contents can be entirely data-aware (from appointments to resources) or you can use unbound data and manually manipulate it. In addition, we provide several data export options so you can move data from the scheduler to a different application with ease.
Binding to an External Data Source
In most instances, you will need to store your data in an external data source such as a data table or custom record collection. In such cases you should bind your scheduler to the required data source using the SchedulerStorage component (it's created automatically when you place the SchedulerControl on a form). This component allows you to specify the datasource and define field mappings so that the scheduler knows which fields to use in order to obtain the start time, end time, event caption, location, etc. You don't necessarily have to define all the mappings exposed by the SchedulerStorage. If you don't intend to use all of the functionality offered by appointments, you can specify just a couple of required fields (the Start and the End fields are mandatory).
You can define any number of custom fields and map them to the appointment's custom properties. The data obtained from custom fields can be used to change appointment information displayed in the Scheduler View. Custom fields can be exposed to end-users via custom appointment editing forms.
To provide multi-resource display, you should bind one more record collection to the SchedulerStorage. Each record in this collection will represent a resource with its caption, color and ID - which is used to bind appointments and resources.
NB: Search our CodeCentral using the following link for Techniques of binding XtraScheduler to data sources.
Design-time Mappings Wizard
Creating mappings between fields in a data table and an appointment's properties is tedious and can cause obscure application errors due to typos in field names or incorrect relations. DevExpress Mapping Wizards help you map data fields in the shortest time possible. The Scheduler provides two wizards for Visual Studio design time operations - one to map appointment fields and another for resources. The wizards can be invoked via the scheduler control's smart tag.
If you do not bind a data source to the SchedulerStorage, it will maintain appointments and resources in its internal storage system. Thus, you can simply drop the SchedulerControl onto a form and instantly get a fully functioning calendar.
Unbound mode is a quick and easy way to get started with the XtraScheduler™ control and explore its many capabilities or when you need to manually control/manage data. Keep in mind the following tips when using the XtraScheduler™ Suite in Unbound mode:
- All fields required for appointment functionality are automatically created and maintained.
- The data entered into the scheduler can be saved to a file and restored at a later time.
- You can combine data-aware and unbound mode. For instance, you can store resources in an external data table but use unbound mode for appointments.
Binding Custom Fields to an Appointment
The default data fields used for appointment management are not a limit to the data an appointment can hold. You can additionally specify any number of fields you need via the storage's Appointments.CustomFieldMappings property. If you specify custom fields, you can allow your end users to modify field values via custom dialogs, or initialize these fields in code. With this approach you don't have to create any additional data storage to maintain extended data for individual appointments.