GanttControl.SetDependency(GanttControlNode, GanttControlNode, DependencyType, TimeSpan) Method
Allows you to specify a dependency between two tasks.
Namespace: DevExpress.XtraGantt
Assembly: DevExpress.XtraGantt.v24.1.dll
NuGet Package: DevExpress.Win.Gantt
Declaration
public void SetDependency(
GanttControlNode predecessorNode,
GanttControlNode successorNode,
DependencyType type,
TimeSpan lag
)
Parameters
Name | Type | Description |
---|---|---|
predecessorNode | GanttControlNode | An object that specifies the predecessor task (node). |
successorNode | GanttControlNode | An object that specifies the successor task (node). |
type | DependencyType | A value that specifies a dependency type. |
lag | TimeSpan | A value that specifies a time lag between the predecessor and successor tasks. |
Remarks
Use the following methods to get an object that contains data for a specific dependency:
GetDependencyRow(Int32, Int32) — Returns an Object in the bound data source that contains data for the specified dependency.
GetDependencyDataRow(Int32, Int32) — Returns a DataRow in the bound DataTable that contains data for the specified dependency.
To specify the node in the method’s parameter, use the node’s Id property value.
The SetDependency(GanttControlNode, GanttControlNode, DependencyType, TimeSpan)
method allows you to specify a dependency in code.
You can also use the following methods to get an object that contains data for a specific node:
GetRow(Int32) — Returns an Object in the bound data source that contains data for the specified node.
To get the focused node’s data row, use the GetFocusedRow() method.
GetDataRow(Int32) — Returns a DataRow in the bound DataTable that contains data for the specified node.
To get the focused node’s DataRow, use the GetFocusedDataRow() method.
Note
If the bound data source is a custom collection, these methods return null (Nothing in VB).