AppointmentStorage.CommitIdToDataSource Property
Gets or sets whether the appointment ID value should be passed to the data source.
Namespace: DevExpress.XtraScheduler
Assembly: DevExpress.XtraScheduler.v24.2.dll
NuGet Package: DevExpress.Win.Scheduler
#Declaration
[DefaultValue(false)]
public bool CommitIdToDataSource { get; set; }
#Property Value
Type | Default | Description |
---|---|---|
Boolean | false | true, to pass the appointment’s Persistent |
#Remarks
When an appointment is created, the appointment’s ID is null. If the Appointment.Id property is not mapped, the property always returns null. This does not indicate any problem, because an appointment object uses internal methods to retrieve its unique identifier from the data source.
If the Appointment.Id mapping (AppointmentMappingInfo.AppointmentId property) is specified and the CommitIdToDataSource property is set to true, the scheduler attempts to save an identifier of the newly created appointment back to the data store. Set the CommitIdToDataSource property to true if the appointment identifier PersistentObject.Id value is generated in the application code and should be stored in the bound data source.
Otherwise, you can set the CommitIdToDataSource property to false and set the AppointmentStorage.AutoRetrieveId property to true to automatically retrieve the Id value from the data adapter and assign it to the Appointment.ID property of the newly created appointment. Set the CommitIdToDataSource property to false if the data source utilizes an auto incremented appointment Id column (or values for this column are generated by the data source and not within the application code).
Tip
When implementing the Gantt View, set the Commit
Important
This API is intended to be used with the legacy Scheduler
- Scheduler
Data replaces SchedulerStorage Storage - Appointment
Data replaces AppointmentStorage Storage - Resource
Data replaces ResourceStorage Storage - Appointment
Dependency replaces AppointmentData Storage Dependency Storage
#Related GitHub Examples
The following code snippets (auto-collected from DevExpress Examples) contain references to the CommitIdToDataSource 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.