corelibraries-devexpress-dot-xtrascheduler-dot-resourcemappinginfo-24633a65.md
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
[DefaultValue("")]
public virtual string Id { get; set; }
<DefaultValue("")>
Public Overridable Property Id As String
| Type | Default | Description |
|---|---|---|
| String | String.Empty |
A String value that specifies the name of the bound data field.
|
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
ResourceMappingInfo mappings = this.schedulerStorage.Resources.Mappings;
mappings.Id = "ResID";
mappings.Color = "ResColor";
winforms-scheduler-handle-fetchappointments-event/CS/Form1.cs#L28
ResourceMappingInfo mappings = this.schedulerStorage1.Resources.Mappings;
mappings.Id = "ResID";
mappings.Color = "ResColor";
ResourceMappingInfo mappings = this.schedulerStorage1.Resources.Mappings;
mappings.Id = "ResID";
mappings.Caption = "Name";
winforms-scheduler-replace-default-command/CS/WindowsFormsApplication1/Form1.cs#L39
ResourceMappingInfo mappings = this.schedulerStorage1.Resources.Mappings;
mappings.Id = "ResID";
mappings.Caption = "Name";
winforms-scheduler-handle-fetchappointments-event-entity-framework/CS/Form1.cs#L62
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
Dim mappings As ResourceMappingInfo = Me.schedulerStorage.Resources.Mappings
mappings.Id = "ResID"
mappings.Color = "ResColor"
winforms-scheduler-handle-fetchappointments-event/VB/Form1.vb#L33
Dim mappings As ResourceMappingInfo = schedulerStorage1.Resources.Mappings
mappings.Id = "ResID"
mappings.Color = "ResColor"
Dim mappings As ResourceMappingInfo = schedulerStorage1.Resources.Mappings
mappings.Id = "ResID"
mappings.Caption = "Name"
winforms-scheduler-replace-default-command/VB/WindowsFormsApplication1/Form1.vb#L39
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
schedulerStorage1.Appointments.Mappings.OriginalOccurrenceEnd = "OriginalEndTime"
schedulerStorage1.Resources.Mappings.Id = "ID"
schedulerStorage1.Resources.Mappings.Caption = "Model"
See Also