GanttView allows you to define task dependencies such as task predecessor and task successor. A task predecessor’s start or finish date determines the start or finish date of its successor task. When you assign a predecessor task in C1GanttView the project automatically creates an arrow that points to the following task. If the predecessor type is not specified the finish-to-start dependency is created by default.
Additionally you can also specify the lag time if there is an expected delay for something that must happen between two linked tasks by using the Lag property of the Predecessor class. For example, if you are waiting for a delivery of materials to arrive you can specify a lag time (in days). Days are the default unit for lag time.
You can use the Predecessors and the Successors properties of the Task class to add a task predecessor and successor respectively. You can also specify the type of predecessor to be added by using the PredecessorType property of the Predecessor class which takes PredecessorType enumeration as an input to set the predecessor type to one of the following values:
Task Image | Link Type | Description | Example |
---|---|---|---|
Finish-to-start(FS) | This dependency is created by default when you link two tasks in C1GanntView. The order in which you select the tasks treats the first as the predecessor, the second as the successor.The work of task (B) can only start after all the work for task (A) is finished. | For example, if you have two tasks, "Dig hole" and "Plant tree," the "Plant tree" task cannot begin until the "Dig hole" task is completed. | |
Start-to-start(SS) | The dependent task can start at any time after the task that it depends on begins.This dependency is used when two tasks can overlap or be done in parallel. When you overlap the tasks it will help reduce the total work time. For example if Task A will take 7 days and Task B will take 10 days then the overall time of the two tasks is only 10 days The SS type does not require that both tasks begin at the same time. | For example, if you have two tasks, “Planning phase” and “writing phase”, the “writing phase” task cannot begin until the “planning phase” begins. | |
Finish-to-finish (FF) | The finish date of task (A) determines the finish date of task (B). This dependency is used when two tasks can overlap or be done in parallel. When you overlap the tasks it will help reduce the total work time. For example if Task A will take 7 days and Task B will take 10 days then the overall time of the two tasks is only 10 days. | For example, if you have two tasks, “set up inner tent” and “snap together poles”, the “snap together poles” (Task B) cannot be completed until the “set up inner tent” (Task A) is completed. | |
Start-to-finish(SF) | The start date of Task (A) determines the finish date of Task (B). This type of dependency usually occurs less frequently. | For example, the book shelves for your construction project are built off-site. Two of the tasks in your project are “Wood delivery” and “Assemble book shelves”. The “assemble bookshelves” task cannot be completed until the “wood delivery” task begins. |
Use the below code to add a task predecessor programatically.
C# |
Copy Code
|
---|---|
//Add a predecessor Predecessor p = new Predecessor(); p.PredecessorTask = task1; Task1.Predecessors.Add(p); |