ComponentOne GanttView for WinForms
Working with GanttView / Task Operations / Split Tasks
In This Topic
    Split Tasks
    In This Topic

    GanttView for WinForms enables you to split tasks into several parts, making it easy for you to deal with complex and extensive tasks. You can move the separated parts of a task, increase and decrease period of work or suspension on chart view. Additionally, it also facilitates you to put a task on hold in the middle by allowing you to split the task, so that a part of it can be started later.

    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

    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.
      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 use SplitTask method of the Task class to split a task programmatically. The Task class provides two overloads for the SplitTask method.
    Below code snippet shows how you can split a task programmatically.

    C#
    Copy Code
    c1GanttView1.Tasks[6].SplitTask(c1GanttView1.Tasks[6].Start.Value.AddDays(15), 3);