Skip to main content
A newer version of this page is available. .

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