Skip to main content

Appointment.ResourceId Property

Gets or sets the unique identifier of the resource associated with the current appointment, or the ID of the first resource if resource sharing is enabled.

Namespace: DevExpress.XtraScheduler

Assembly: DevExpress.XtraScheduler.v24.2.Core.dll

Declaration

object ResourceId { get; set; }

Property Value

Type Description
Object

A Object value that specifies the resource’s unique identifier.

Remarks

The ResourceId property specifies the identifier of the appointment’s associated resource. All resources must have unique IDs.

Tip

Use the Appointment.ResourceIds property to get a collection of associated resources if resource sharing is enabled.

Resources are used to group schedules. An appointment can be associated with a resource, or it can be standalone. To associate an appointment with a resource, the appointment’s ResourceId property should be set to the value specified by the required resource’s IPersistentObject.Id property. For standalone appointments, the ResourceId property is set to the EmptyResourceId value.

Note

If resource sharing is enabled (the AppointmentStorageBase.ResourceSharing property is set to true), the ResourceId property returns the ID of the first resource contained in the Appointment.ResourceIds collection.

Note

If an appointment doesn’t belong to any particular resource (the ResourceId property is set to the EmptyResourceId), the scheduler shows it for all resources when the SchedulerControl.GroupType property is set to the SchedulerGroupType.Resource or SchedulerGroupType.Date value. . Appointments without assigned resources are hidden if the SchedulerOptionsViewBase.ShowOnlyResourceAppointments property is set to true.

The following code snippets (auto-collected from DevExpress Examples) contain references to the ResourceId property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also