Back to Devexpress

ResourceMappingInfo.Id Property

corelibraries-devexpress-dot-xtrascheduler-dot-resourcemappinginfo-24633a65.md

latest6.9 KB
Original Source

ResourceMappingInfo.Id Property

Gets or sets the data field to which a resource’s Id property is bound.

Namespace : DevExpress.XtraScheduler

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

NuGet Package : DevExpress.Scheduler.Core

Declaration

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

Property Value

TypeDefaultDescription
StringString.Empty

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

|

Remarks

Use the Id property to bind a resource’s IPersistentObject.Id property to a data field. The data field is taken from the data source specified by the PersistentObjectStorage<T>.DataSource property of the ResourceStorage.

Note

If a SchedulerControl is used in bound mode (that is, its data is stored in a database), the Id property needs to be bound to the corresponding dataset field. If resource sharing is enabled (the SchedulerStorage.Appointments.ResourceSharing property is set to true ), the ResourceID data field will hold an xml string instead of an integer. Provide a mapping that satisfies this condition.

The following code snippets (auto-collected from DevExpress Examples) contain references to the Id 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.

winforms-scheduler-gantt-view/CS/dxT183299/Form1.cs#L60

csharp
ResourceMappingInfo mappings = this.schedulerStorage.Resources.Mappings;
mappings.Id = "ResID";
mappings.Color = "ResColor";

winforms-scheduler-handle-fetchappointments-event/CS/Form1.cs#L28

csharp
ResourceMappingInfo mappings = this.schedulerStorage1.Resources.Mappings;
mappings.Id = "ResID";
mappings.Color = "ResColor";

how-to-initialize-appointment-images-and-display-text-using-the-custom-field-values-t328320/CS/CustomAppointmentImageAndText/Form1.cs#L56

csharp
ResourceMappingInfo mappings = this.schedulerStorage1.Resources.Mappings;
mappings.Id = "ResID";
mappings.Caption = "Name";

winforms-scheduler-replace-default-command/CS/WindowsFormsApplication1/Form1.cs#L39

csharp
ResourceMappingInfo mappings = this.schedulerStorage1.Resources.Mappings;
mappings.Id = "ResID";
mappings.Caption = "Name";

winforms-scheduler-handle-fetchappointments-event-entity-framework/CS/Form1.cs#L62

csharp
this.schedulerStorage1.Appointments.Mappings.OriginalOccurrenceEnd = "OriginalEndTime";
this.schedulerStorage1.Resources.Mappings.Id = "ID";
this.schedulerStorage1.Resources.Mappings.Caption = "Model";

winforms-scheduler-gantt-view/VB/dxT183299/Form1.vb#L57

vb
Dim mappings As ResourceMappingInfo = Me.schedulerStorage.Resources.Mappings
mappings.Id = "ResID"
mappings.Color = "ResColor"

winforms-scheduler-handle-fetchappointments-event/VB/Form1.vb#L33

vb
Dim mappings As ResourceMappingInfo = schedulerStorage1.Resources.Mappings
mappings.Id = "ResID"
mappings.Color = "ResColor"

how-to-initialize-appointment-images-and-display-text-using-the-custom-field-values-t328320/VB/CustomAppointmentImageAndText/Form1.vb#L53

vb
Dim mappings As ResourceMappingInfo = schedulerStorage1.Resources.Mappings
mappings.Id = "ResID"
mappings.Caption = "Name"

winforms-scheduler-replace-default-command/VB/WindowsFormsApplication1/Form1.vb#L39

vb
Dim mappings As ResourceMappingInfo = Me.schedulerStorage1.Resources.Mappings
mappings.Id = "ResID"
mappings.Caption = "Name"

winforms-scheduler-handle-fetchappointments-event-entity-framework/VB/Form1.vb#L55

vb
schedulerStorage1.Appointments.Mappings.OriginalOccurrenceEnd = "OriginalEndTime"
schedulerStorage1.Resources.Mappings.Id = "ID"
schedulerStorage1.Resources.Mappings.Caption = "Model"

See Also

ResourceMappingInfo Class

ResourceMappingInfo Members

DevExpress.XtraScheduler Namespace