Appointments in the XtraScheduler control can be associated with resources. A resource is an object which exposes the DevExpress.XtraScheduler.Resource interface. It has the following attributes: a unique identifier, caption, color and image.
The XtraScheduler control allows appointments to be grouped by resources. Use the SchedulerControl.GroupType property to specify the required group mode.
The ResourceStorage class represents a storage which holds resources. The functionality of the ResourceStorage class can be accessed via the SchedulerStorage.Resources property. To get the collection of resources use the DevExpress.XtraScheduler.ResourceStorageBase.Items property.
To associate a resource with an appointment this resource should be added to the ResourceStorage object and then bound to the appointment via the DevExpress.XtraScheduler.Appointment.ResourceId property. It represents a resource ID specified by the DevExpress.XtraScheduler.IPersistentObject.Id property.
Connecting the ResourceStorage object to a data source via the DevExpress.XtraScheduler.PersistentObjectStorage<T>.DataSource and DevExpress.XtraScheduler.PersistentObjectStorage<T>.DataMember properties enables bound mode. In this mode, if the DevExpress.XtraScheduler.PersistentObjectStorage<T>.AutoReload property is set to true resources are automatically retrieved from the specified data source and added to the ResourceStorage object, and when data in the data source is modified the ResourceStorage object automatically reloads the data. If the AutoReload property is set to false data is not automatically loaded and reloaded from the data source. You should use the DevExpress.XtraScheduler.SchedulerStorageBase.RefreshData method to reload data manually in this case.
Use the Mappings property to specify which fields in the bound data source hold a resource's caption, color and ID. The values of these fields will be synchronized with the corresponding properties of DevExpress.XtraScheduler.Resource objects.
Appointments for the scheduler control are stored in the AppointmentStorage object. In bound mode, appointments are retrieved from and stored back to a data source specified by the DataSource and DataMember properties of the AppointmentStorage object. This data source may contain a field which holds the resource ID's of appointments. To enable the resource ID's to be automatically retrieved from the database, set the DevExpress.XtraScheduler.AppointmentMappingInfo.ResourceId property to the name of this field.
In unbound mode (when the ResourceStorage object is not bound to a data source) you can use the DevExpress.XtraScheduler.ResourceStorageBase.Items property to populate the storage with resources manually.