Features > Task Management > Task Splitting |
GanttView provides task splitting feature to account for unanticipated work interruptions because of various factors, such as, addition of new tasks in existing plan, unavailability of resources, change in task priority or unplanned leaves. Using this feature, user can easily put a task on hold in the middle so that a part of it can be started later or another high priority task can be taken up. In addition, user can also split a task as many times according to the requirement.
GanttView enables users to split task at runtime as well as through code. The Split Task button available in the toolbar splits a task into two or more segments.
The following image shows task split into two segments in a GanttView.
Note: The screen tip contains the date at which the split segment is scheduled to start. As you move the mouse pointer along the task bar, the scheduled start date in the screen tip changes. |
A task can also be split at runtime by right clicking a specific point (date) on the task bar and selecting the Split Task option from the context menu. The Split Task option splits the task into two segments and adds a gap of one day in between. The split task segments can then be dragged to another date as per the user requirement.
A task can be split through code by invoking the SplitTask method of the Task class. You can specify the start date of the task segment and the interruption duration in terms of number of days in the method to split a task. The following example illustrates splitting a task through code. This example uses the sample created in the Quick start.
'Splitting a task into two segments
gv.Tasks(2).SplitTask(gv.Tasks(2).Start.Value.AddDays(2), 2)
//Splitting a task into two segments
gv.Tasks[2].SplitTask(gv.Tasks[2].Start.Value.AddDays(2), 2);
Limitations: By design, the task splitting feature of GanttView does not apply in the following conditions:
|