ComponentOne GanttView for WinForms
Splitting Tasks
GanttView for WinForms Task-Based Help > Splitting Tasks

GanttView for WinForms allows you to split tasks into several parts to determine times of work and suspensions. You can move the separated parts of a task, increase and decrease period of work/suspension on chart view using mouse. You can also split the selected task from the context menu by clicking Split task menu item. If you need to put a task on hold in the middle, you can easily split the task so that a part of it can be started later. You can also split a task as many times as you need.

Split task feature can be used in situations where a resource already working on a task goes on a leave or is assigned another task on high priority. In the latter case, the resource might need to put the currently assigned task on hold to start the newly assigned task. In this situation, the ongoing task can be split into two parts so that the newly assigned high priority task can be started. The resource can resume the interrupted task again as soon as the high priority task gets completed.

Split a task at run time

To understand how to split a task in C1GanttView, you need to follow the given steps at runtime:

  1. Right-click on a task's Gantt bar, on the date where you want the split.
    A context menu will appear.
  2. Select Split Task from the context menu as shown in the following image:

    Task will split on the selected date.

  3. Drag the second part of the bar to the date from where you want to resume that task again as shown in the image below:

Split a task programmatically

You can also split a task programmatically. To do so, use the following code:

C1GanttView1.Tasks(6).SplitTask(C1GanttView1.Tasks(6).Start.Value.AddDays(15), 3)
c1GanttView1.Tasks[6].SplitTask(c1GanttView1.Tasks[6].Start.Value.AddDays(15), 3);