Activity or Task
The basic unit of work represented in the Gantt control is referred to as an Activity or a Task. The control's API usually refer to them as Activity while the samples and documentation refer to them as Tasks. The control assumes no distinction between the two.
There are typically a hierarchy of parent (summary) and child activities in a project and in fact, the GanttControl's model consists of an Activities hierarchy in hierarchical data structures. But, in real world, the activities list is easily represented by a flat list and so the GanttControl primarily binds to a flat list of activities.
Indent Level
In a flat list of activities, each activity is assigned an Indent Level which define the parent/child relationship.
For example, consider an activity hierarchy like this:
Summary Task 1
Child Task 1
Child Task 2
In a flat list, these will be represented by objects with values like these, for example:
{TaskName="Summary Task 1", IndentLevel=0}
{TaskName="Child Task 1", IndentLevel=1}
{TaskName="Child Task 1", IndentLevel=1}
See how the IndentLevel setting dictates the parent/child relationship.
StartTime, EndTime and Effort
Every activity in the Gantt control will have a StartTime and Effort associated with it. The duration of the task will be calculated based on the number of resource assignments (multiple resource assignments decreases the time taken to perform a task). The EndTime will be calculated based on the StartTime and duration required to complete the task.
If the activity is a parent activity then it's StartTime and EndTime are representation of the time lines of its child activities.
Dependencies, if any, setup between activities can also influence the StartTime of an activity. More on this in the Dependencies section.
The user can change the StartTime of an activity by simply moving the task left or right in the chart or by editing the value in the table. Similarly, a task's Effort can be edited by the end-user by resizing the width of the activity in the chart or by editing it's value in the table.
SortOrder
If you are going to allow moving tasks up/down or inserting a task in between other tasks (which is almost always the case), you have to include a SortOrder field in your data. Once you do so, follow this pattern:
a) When you retrieve the data from the table, include a "Sort By" in your SQL query to sort by this field, ascending. Or sort the retrieved list by this field before binding it to the gantt.
b) Set the SortOrderBinding property in the gantt to this field.
Note: If you are going to add a SortOrder field to an existing table, make sure to give appropriate values from 1 to N representing their order, instead of simply specifying 0 for all the tasks.
ProgressPercent
Optionally, the progress made so far in accomplishing a task can be represented in the control. A field in the bound task object can provide this value which should be between 0-100.
Assigned Resources
One or more resources can be assigned to an activity with the ability to assign the resource full-time (100%) or more, or less, defined by the assignments AllocationUnit. The duration of the task is automatically updated based on the number of resources assigned to it.
The GanttControl can also do resource-leveling to avoid resource overload.
PreferredStartTime
This optional setting allows you associate a preferred StartTime for an activity which allows the Gantt to try to anchor the activity to this time whenever possible. Persisting this setting is essential to automatically move hierarchies of activities back and forth.
� RadiantQ 2009 - 2019. All Rights Reserved.