Skip to main content
A newer version of this page is available. .

Assigning Appointments to Resources

  • 3 minutes to read

This document describes how appointments can be assigned to different resources.

Assigning Appointments to Resources

A single resource is an object that exposes the Resource interface. All of scheduler’s resources are stored in the ASPxResourceStorage (which is a part of the Scheduler Storage and is accessed via its ASPxSchedulerStorage.Resources property).

If a Resource Storage contains at least one resource, then it is possible to assign appointments to resources. This may be done in different ways, depending on whether resource sharing is enabled or not.

Grouping by Resources

A resource becomes enabled in the scheduler only when its data is shown grouped by either dates (SchedulerControl.GroupType is set to SchedulerGroupType.Date) or by resources (SchedulerControl.GroupType is set to SchedulerGroupType.Resource).

Note

If the Resource.Visible property of any resource is set to false, and appointments grouping is enabled, then all the appointments that belong to this resource will be hidden.

The following image demonstrates the common look of the Scheduler Control grouped by dates in the Month View.

Resources_03

The Resource Navigator element is shown when the scheduler enters the group mode. It can be used by end-users to scroll through resources, and to change the number of resources displayed at one time on screen. To hide the Resource Navigator, set its ResourceNavigator.Visibility property to ResourceNavigatorVisibility.Never.

Note

You can manually set the number of resources visible at once on a screen for every View via the SchedulerViewBase.ResourcesPerPage property of the appropriate view.

Storing and Retrieving Resources

Resources for appointments can be stored in a data table. Refer to the Data Table Structure document for more information.

ASPxScheduler uses the mappings mechanism to bind scheduler objects to the data fields. See the ASPxResourceMappingInfo class description and Mappings Wizards topic for the mappings overview.

When resources are assigned to a particular appointment, the Appointment.ResourceId and Appointment.ResourceIds values’ storing and retrieving are automatically accomplished by the AppointmentMappingInfo.ResourceId mapping. The AppointmentStorageBase.ResourceSharing value controls how the data field value should be interpreted.

Note

If the resource for an appointment is not specified, it is assumed that the appointment belongs to any resource. Use the SchedulerOptionsViewBase.ShowOnlyResourceAppointments property to specify its visibility. If the resource assigned to an appointment is missing in a resource storage, this appointment is not loaded in appointment storage. It means that a Scheduler without resources does not display appointments with resources.

See Also