All docs
V21.2
21.2
21.1
20.2
20.1
19.2
The page you are viewing does not exist in version 19.2. This link will take you to the root page.
19.1
The page you are viewing does not exist in version 19.1. This link will take you to the root page.
18.2
The page you are viewing does not exist in version 18.2. This link will take you to the root page.
18.1
The page you are viewing does not exist in version 18.1. This link will take you to the root page.
17.2
The page you are viewing does not exist in version 17.2. This link will take you to the root page.

DependencyType Enum

Enumerates values that specify types of dependencies between tasks.

Namespace: DevExpress.XtraGantt

Assembly: DevExpress.XtraGantt.v21.2.dll

Declaration

public enum DependencyType

Members

Name Description Value
FinishToStart

The successor starts after the predecessor finishes.

0

FinishToFinish

The successor finishes after the predecessor finishes.

1

StartToFinish

The successor finishes after the predecessor starts.

2

StartToStart

The successor starts after the predecessor starts.

3

Related API Members

The following properties accept/return DependencyType values:

Remarks

The GanttControl.DependencySource property specifies the data source that contains dependencies. Use the TypeFieldName property to specify the name of the field in the data source that stores dependency types.

The field’s data type should be either DependencyType or Integer. The DependencyType enumeration is a set of named integer constants. You can store dependency types as integers in the data source.

Example

The code below uses integer values to specify dependency types.

using DevExpress.XtraGantt;
using System.Data;

ganttControl1.DependencySource = GetDependencies();

private object GetDependencies() {
    DataTable table = new DataTable();
    DataColumn predecessor = new DataColumn("PredecessorID", typeof(int));
    DataColumn successor = new DataColumn("SuccessorID", typeof(int));
    DataColumn dependencyType = new DataColumn("DependencyType", typeof(DependencyType));
    DataColumn lag = new DataColumn("TimeLag", typeof(TimeSpan));
    table.Columns.AddRange(new DataColumn[] { predecessor, successor, dependencyType, lag });
    //Note that an integer value is used to specify the dependency type.
    table.Rows.Add(new object[] { 1, 2, 2, new TimeSpan(12, 0, 0) });
    table.Rows.Add(new object[] { 2, 3, 3, null });
    return table;
}
See Also