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

    GanttView control allows you to disable a task by inactivating it, while maintaining its record in the project. When you inactivate a task, it remains in the project plan but does not affect other tasks schedule, project schedule, and resource availability.

    Inactivating tasks can help in building project budgets by disabling the tasks that are no longer required, without deleting them permanently. Deleting a task can affect the schedule of the entire project plan. Hence, inactivating a task is always a better option as you can keep the record of cancelled tasks and reactivate them anytime during the scope of the project.

    Inactivate a task at run time

    To inactivate a task at run time, follow the steps given below:

    1. Select the task you wish to inactivate in the grid.
    2. Click Inactive button on the GanttView toolbar to inactivate the selected task.
      The selected task gets deactivated.

    Inactivate a task programmatically

    You can inactivate a task programmatically by setting the Inactive property of the Task class to True.

    Below code snippet shows how you can inactivate a task programmatically.

    C#
    Copy Code
    //Inactivate a task
    c1GanttView1.Tasks[4].Inactive = true;