GanttDependencyMappings.PredecessorFieldName Property
Gets or sets the data source field that specifies a task’s predecessor. Use a task’s key to specify the predecessor.
Namespace: DevExpress.XtraGantt
Assembly: DevExpress.XtraGantt.v20.1.dll
NuGet Package: DevExpress.Win.Gantt
Declaration
[DXCategory("Mappings")]
[DefaultValue("PredecessorID")]
[XtraSerializableProperty]
public string PredecessorFieldName { get; set; }
Property Value
Type | Default | Description |
---|---|---|
String | "PredecessorID" | The data source field that specifies a task’s predecessor. |
Remarks
The DataSource property allows you to bind the control to a data source. The KeyFieldName property specifies a task’s unique identifier (key). See the TreeList.KeyFieldName property for more information.
The ParentFieldName property specifies a parent task’s key. This field allows you to organize tasks in a tree. See the TreeList.ParentFieldName property for more information.
You can also use a task’s key to specify the task’s predecessor(s).
If you need finish-to-start dependencies only, use the PredecessorsFieldName property to specify the data field that contains predecessors’ keys. The data should be of the System.Collections.IEnumerable type. The enumerator should return key values of the same type as the key field. In particular, you can use the following types:
- IList — use this type to allow users to modify dependencies and save changes to the data source. The collection should not be read only.
- String — the string should contain keys separated by space, comma, or semicolon (‘ ‘, ‘,’ ‘;’).
If you need finish-to-start and other dependency types, use the PredecessorFieldName
and SuccessorFieldName properties and a separate data source assigned to the DependencySource property. See Task Dependencies for more information.