All docs
V20.2
21.2
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.

Resource

NOTE

Resources and resource assignments are optional in the Gantt control.

Resources specify people responsible for tasks, equipment, materials, etc.

Use the following APIs to specify whether the Gantt hides resources or displays them as task labels:

  • The ShowResources server-side property.

    <dx:ASPxGantt ID="Gantt" runat="server" ... >
        <SettingsGanttView ShowResources="false" />
        ...
    </dx:ASPxGantt>
    
  • The ShowResources(value) client-side method.

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

Resource assignments specify which resources are assigned to tasks. You can assign multiple resources to a task.

The Gantt gets data for resources and resource assignments from separate data sources (ResourcesDataSourceID and ResourceAssignmentsDataSourceID). Use the Resource and ResourceAssignment objects to specify which fields in the data sources correspond to properties of the resource and resource assignment.

<dx:ASPxGantt ID="Gantt" runat="server" ResourceDataSourceID="ResourcesDataSource" ResourceAssignmentsDataSourceID="ResourceAssignmentsDataSource" ... >
    <Mappings>
        <Resource Key="ID" Name="Name" Color="Color" />
        <ResourceAssignment Key="ID" TaskKey="TaskID" ResourceKey="TeamID" />
        ...
    </Mappings>
    ...
</dx:ASPxGantt>

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

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

See Also

Online Demos