This topic explains how to configure a task as either active or inactive using the xamGantt™ control.
The following topics are prerequisites to understanding this topic:
This topic contains the following sections:
The following table lists the configurable aspects of the ProjectTask’s state (active or inactive). Additional details follow after the table.
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
The following table maps the desired configuration to property settings.
The screenshot below illustrates how to set the task state as inactive using the following settings:
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
The following topics provide additional information related to this topic.