AppointmentDependency Interface

A dependency established between tasks (Appointment objects) in the Gantt view.

Namespace: DevExpress.XtraScheduler

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

Declaration

public interface AppointmentDependency :
    IPersistentObject,
    IBatchUpdateable,
    IDisposable,
    IIdProvider
Public Interface AppointmentDependency
    Inherits IPersistentObject,
             IBatchUpdateable,
             IDisposable,
             IIdProvider

Related API Members

The following members accept/return AppointmentDependency objects:

Show 20 links
Library Related API Members
Cross-Platform Class Library AppointmentDependencyBaseCollection.GetDependencyByIds(Object, Object)
IAppointmentDependencyFactory.CreateAppointmentDependency(Object, Object)
IAppointmentDependencyFactory.CreateAppointmentDependency(Object, Object, AppointmentDependencyType)
IAppointmentDependencyStorage.CreateAppointmentDependency(Object, Object)
IAppointmentDependencyStorage.CreateAppointmentDependency(Object, Object, AppointmentDependencyType)
ISchedulerStorageBase.CreateAppointmentDependency(Object, Object)
ISchedulerStorageBase.CreateAppointmentDependency(Object, Object, AppointmentDependencyType)
SchedulerStorageBase.CreateAppointmentDependency(Object, Object)
SchedulerStorageBase.CreateAppointmentDependency(Object, Object, AppointmentDependencyType)
WinForms Controls AppointmentDependencyDataStorage.Add(Object, Object)
AppointmentDependencyDataStorage.Add(Object, Object, AppointmentDependencyType)
AppointmentDependencyDataStorage.CreateAppointmentDependency(Object, Object)
AppointmentDependencyDataStorage.CreateAppointmentDependency(Object, Object, AppointmentDependencyType)
AppointmentDependencyDataStorage.Item[Int32]
AppointmentDependencyFormEventArgs.AppointmentDependency
SchedulerDataStorage.CreateAppointmentDependency(Object, Object)
SchedulerDataStorage.CreateAppointmentDependency(Object, Object, AppointmentDependencyType)
WPF Controls SchedulerStorage.CreateAppointmentDependency(Object, Object)
SchedulerStorage.CreateAppointmentDependency(Object, Object, AppointmentDependencyType)
Silverlight Controls SchedulerStorage.CreateAppointmentDependency(Object, Object)

Remarks

An AppointmentDependency object is a link established between two tasks (appointment objects). The link originates from the appointment specified by its identifier via the AppointmentDependency.ParentId property and is directed to the appointment specified by the AppointmentDependency.DependentId property. A link type is specified via the AppointmentDependency.Type property.

AppointmentDependency

A dependency requires two appointment IDs. The type of dependency can be set explicitly or implied. By default, the type is AppointmentDependencyType.FinishToStart.

You can create a number of dependencies with one ID being identical, and differing in the other ID and type. So, a certain appointment can have multiple dependencies. But it is not correct to have multiple dependencies which differ in type only. Such relationships are ambiguous and are not processed (i.e. only one dependency is processed and displayed).

AppointmentDependency objects are stored in the SchedulerStorage.AppointmentDependencies storage. A collection of dependencies can be obtained via the AppointmentDependencies.Items method. You can then use methods such as AppointmentDependencyBaseCollection.GetDependenciesByDependentId, AppointmentDependencyBaseCollection.GetDependenciesByParentId and AppointmentDependencyBaseCollection.GetDependencyByIds to access individual dependencies.

The following code snippet adds a new dependency between two appointments:

using DevExpress.XtraScheduler;
// ...
object Id1 = schedulerDataStorage1.Appointments[0].Id;
object Id2 = schedulerDataStorage1.Appointments[1].Id;
schedulerDataStorage1.AppointmentDependencies.CreateAppointmentDependency(
    Id1, Id2, AppointmentDependencyType.FinishToStart);
NOTE

AppointmentDependencies are displayed in the Gantt View only.

If a Scheduler is bound to data, AppointmentDependency objects require a data source with fields mapped using information contained in the AppointmentDependencyMappingInfo object. At design time, use the Scheduler smart tag to invoke a mapping wizard to assist you in specifying correct mappings. See the Data Sources topics for more information on data tables.

See Also