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.v20.1.Core.dll

Declaration

object ResourceId { get; set; }
Property ResourceId As Object

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.

See Also