All docs
V20.2
21.2 (EAP/Beta)
21.1
20.2
20.1
19.2
19.1
The page you are viewing does not exist in version 19.1. This link will take you to the root page.
18.2
The page you are viewing does not exist in version 18.2. This link will take you to the root page.
18.1
The page you are viewing does not exist in version 18.1. This link will take you to the root page.
17.2
The page you are viewing does not exist in version 17.2. This link will take you to the root page.
A newer version of this page is available. Switch to the current version.

Task

  • 2 minutes to read

A task is a unit of work. On the Gantt chart, it displays the following information:

  • Task title.

  • Duration (start and end dates).

  • Task progress.

  • Associated dependencies that specify relationships between tasks.

  • Associated resources.

A large task can be divided into subtasks that allow you to track the progress.

A milestone is a task with the same start and endpoint. Milestones can be used as checkpoints for important points in a project.

The Gantt gets data for tasks from a data source (TasksDataSourceID). Use the Task object to specify which fields in the data source correspond to task properties.

<dx:ASPxGantt ID="Gantt" runat="server" TasksDataSourceID="TasksDataSource" ... >
    <Mappings>
        <Task Key="ID" ParentKey="ParentID" Title="Subject" Start="StartDate" 
        End="EndDate" Progress="PercentComplete" Color="Color" />
        ...
    </Mappings>
    ...
</dx:ASPxGantt>

<asp:SqlDataSource ID="TasksDataSource" runat="server" 
ConnectionString='<%$ ConnectionStrings:DevelopmentGanttConnectionString %>' 
SelectCommand="SELECT * FROM [Tasks]" />

The table below lists the main members that affect task appearance and functionality.

API

Description

TaskTitlePosition

Specifies where to display a task: none, inside or outside the task.

<dx:ASPxGantt ID="Gantt" runat="server" ...>
    <SettingsGanttView TaskTitlePosition="Outside" />
</dx:ASPxGantt>

ShowResources (server-side property)

Specifies whether to display task resources.

<dx:ASPxGantt ID="Gantt" runat="server" ...>
    <SettingsGanttView ShowResources="false" />
</dx:ASPxGantt>

ShowResources(value) (client-side method)

Specifies whether to display task resources.

// Set a control's ClientInstanceName property to access the control on the client side.
clientGantt.ShowResources(false);

See Also

Online Demos