Version

Configuring Tasks as Active/Inactive

Topic Overview

Purpose

This topic explains how to configure a task as either active or inactive using the xamGantt™ control.

Required background

The following topics are prerequisites to understanding this topic:

Topic Purpose

This topic explains how to configure a task to be manually or automatically scheduled in the xamGantt control.

Active/Inactive Task Configuration Summary

Active/Inactive task configuration summary chart

The following table lists the configurable aspects of the ProjectTask’s state (active or inactive). Additional details follow after the table.

Configurable aspect Details Property Command

Setting a task as active

programmatically changes the task’s state using either the ProjectTask IsActive property or a command.

Setting a task as inactive

programmatically changes the task’s state is using the ProjectTask IsActive property or a command.

Configuring Task State as Active/Inactive Using IsActive Property

Overview

The ProjectTask has two states:

  • active

  • inactive

By default, the project task state is active.

As long as inactive tasks do not depend on other active tasks, the scheduling engine ignores them.

If a parent task is marked as inactive, all of its children are also deactivated.

The control displays the task in both the xamGantt’s grid and chart sections.

  • In the grid section, the task state appears in the Active column

  • In the chart section, the inactive taskbars are blurred

Note
Note

Project tasks with actuals (Actual Duration, Actual Finish, Actual Start or % Complete fields have values) cannot be set as inactivate.

Property settings

The following table maps the desired configuration to property settings.

In order to: Use this property: And set it to:

Activate/Inactivate

IsActive

bool

Example

The screenshot below illustrates how to set the task state as inactive using the following settings:

Property Value

IsActive

false

Configuring Tasks as Active Inactive 1.png

In C#:

XamGantt gantt = new XamGantt();
Project project = new Project();
ProjectTask task = new ProjectTask();
task.TaskName = "Inactive Task";
task.IsActive = false;
task.Duration = TimeSpan.FromHours(16);
task.Start = DateTime.Today.ToUniversalTime();
project.RootTask.Tasks.Add(task);
gantt.Project = project;

In Visual Basic:

Dim gantt As New XamGantt()
Dim project As New Project()
Dim task As New ProjectTask()
task.TaskName = "Inactive Task"
task.IsActive = False
task.Duration = TimeSpan.FromHours(16)
task.Start = DateTime.Today.ToUniversalTime()
project.RootTask.Tasks.Add(task)
gantt.Project = project

Related Topics

The following topics provide additional information related to this topic.

Topic Purpose

The topics in this group explain the xamGantt ProjectTask class, its configurable aspects and the main features it provides.

This topic describes many of the more commonly used commands available in the xamGantt control and how to use them.