Version

Configuring Task Progress

Topic Overview

Purpose

This topic explains how you set task progress using the xamGantt™ control.

Required background

The following topics are prerequisites to understanding this topic:

Topic Purpose

This topic describes how the xamGantt control can be bound to data via Project property.

In this topic

This topic contains the following sections:

Setting Task Progress

Overview

You specify the project task’s progress as a percentage of work completed.

To specify the progress, use the ProjectTask PercentComplete property and set it to a decimal type in the range from 0 to 100.

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

  • In the grid section, the task progress appears in the % Complete column. If the task work is 100% completed, a check mark notification icon appears in the grid Indicators column.

  • In the chart section, the progress appears as a progress line on the taskbar where the end of the bar represents the CompleteThrough date for the task.

Property settings

The following table maps the desired configuration to property settings.

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

Set task’s progress

decimal

Example

The example below demonstrates how to set a task’s progress to 50%:

Property Value

PercentComplete

50

Configuring Task Progress 1.png

In C#:

XamGantt gantt = new XamGantt();
Project project = new Project();
ProjectTask task = new ProjectTask();
task.TaskName = "Task in progress";
task.IsManual = false;
// Set task progress
task.PercentComplete = 50;
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 = "Task in progress"
task.IsManual = False
' Set task progress
task.PercentComplete = 50
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.