corelibraries-devexpress-dot-xtrascheduler-dot-ipersistentobject-dot-getsourceobject-x28-devexpress-dot-xtrascheduler-dot-ischedulerstoragebase-x29.md
Returns the data object that is bound to the current persistent object.
Namespace : DevExpress.XtraScheduler
Assembly : DevExpress.XtraScheduler.v25.2.Core.dll
NuGet Package : DevExpress.Scheduler.Core
object GetSourceObject(
ISchedulerStorageBase storage
)
Function GetSourceObject(
storage As ISchedulerStorageBase
) As Object
| Name | Type | Description |
|---|---|---|
| storage | ISchedulerStorageBase |
A SchedulerStorageBase object that represents the storage control which owns the persistent object.
|
| Type | Description |
|---|---|
| Object |
A Object that is the data source object which is bound to the persistent object.
|
The following code snippets (auto-collected from DevExpress Examples) contain references to the GetSourceObject(ISchedulerStorageBase) method.
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-linq-to-sql/CS/XtraScheduler_LINQ/Form1.cs#L50
foreach (Appointment apt in e.Objects) {
DBAppointment dbApt = (DBAppointment)apt.GetSourceObject(this.schedulerStorage1);
this.context.DBAppointments.InsertOnSubmit(dbApt);
winforms-scheduler-bind-to-xpo/CS/XPO_XtraScheduler_Simple_Example/Form1.cs#L73
foreach (Appointment apt in e.Objects) {
XPBaseObject o = apt.GetSourceObject((SchedulerDataStorage)sender) as XPBaseObject;
if (o != null)
winforms-scheduler-bind-xpo-multi-resource-appointments/CS/XPO_MultiResource_Example/Form1.cs#L62
foreach (Appointment apt in e.Objects) {
XPBaseObject o = apt.GetSourceObject(schedulerDataStorage1) as XPBaseObject;
if (o != null)
winforms-scheduler-linq-to-sql/VB/XtraScheduler_LINQ/Form1.vb#L53
For Each apt As Appointment In e.Objects
Dim dbApt As DBAppointment = CType(apt.GetSourceObject(schedulerStorage1), DBAppointment)
context.DBAppointments.InsertOnSubmit(dbApt)
winforms-scheduler-bind-to-xpo/VB/XPO_XtraScheduler_Simple_Example/Form1.vb#L73
For Each apt As Appointment In e.Objects
Dim o As XPBaseObject = TryCast(apt.GetSourceObject(DirectCast(sender, SchedulerDataStorage)), XPBaseObject)
If o IsNot Nothing Then
winforms-scheduler-bind-xpo-multi-resource-appointments/VB/XPO_MultiResource_Example/Form1.vb#L64
For Each apt As Appointment In e.Objects
Dim o As XPBaseObject = TryCast(apt.GetSourceObject(schedulerDataStorage1), XPBaseObject)
If o IsNot Nothing Then
See Also