AppointmentMappingInfo.ResourceId Property

Gets or sets the data field to which the Appointment.ResourceId or the Appointment.ResourceIds property is bound.

Namespace: DevExpress.XtraScheduler

Assembly: DevExpress.XtraScheduler.v20.1.Core.dll

Declaration

[DefaultValue("")]
public virtual string ResourceId { get; set; }
<DefaultValue("")>
Public Overridable Property ResourceId As String

Property Value

Type Default Description
String

String.Empty

A String value that specifies the name of the bound data field.

Remarks

Use the ResourceId property to bind an appointment's Appointment.ResourceId or Appointment.ResourceIdsproperty to a data field in the external data source. The data source is specified by the PersistentObjectStorage<T>.DataSource property of the AppointmentStorage.

NOTE

If SchedulerControl.ResourceSharing is enabled, mapped data field should be a text field of sufficient length; otherwise map it to the field of any type but make sure that the type of the Resource ID field is the same in Appointments and Resources tables.

If resources are shared (the SchedulerControl.ResourceSharing option is true in a data-bound mode, or several resource identifiers are added to the Appointment.ResourceIds collection), the mapped data field contains a string in XML format. Since resource identifiers are objects, they are base-64 encoded.

The following string is the content of a data field mapped with the ResourceId mapping if Resources is switched on. An appointment is associated with resources having identifiers 1,2 and 3.


<ResourceIds>
<ResourceId Value="~Xtra#Base64AAEAAAD/////AQAAAAAAAAAEAQAAAAxTeXN0ZW0uSW50MzIBAAAAB21fdmFsdWUACAIAAAAL" />
<ResourceId Value="~Xtra#Base64AAEAAAD/////AQAAAAAAAAAEAQAAAAxTeXN0ZW0uSW50MzIBAAAAB21fdmFsdWUACAEAAAAL" />
<ResourceId Value="~Xtra#Base64AAEAAAD/////AQAAAAAAAAAEAQAAAAxTeXN0ZW0uSW50MzIBAAAAB21fdmFsdWUACAMAAAAL" />
</ResourceIds>

Set the SchedulerCompatibility.Base64XmlObjectSerialization to false to stop base64 serialization. In this situation the stored XML string changes as follows:


<ResourceIds>
<ResourceId Type="System.Int32" Value="2" />
<ResourceId Type="System.Int32" Value="1" />
<ResourceId Type="System.Int32" Value="3" />
</ResourceIds>
See Also