Skip to main content
All docs
V26.1
  • ASPxGantt.TasksDataSourceID Property

    Specifies the data source ID from which the Gantt retrieves tasks.

    Namespace: DevExpress.Web.ASPxGantt

    Assembly: DevExpress.Web.ASPxGantt.v26.1.dll

    Declaration

    [DefaultValue("")]
    public virtual string TasksDataSourceID { get; set; }

    Property Value

    Type Default Description
    String String.Empty

    Specifies the data source ID.

    Remarks

    The Gantt control requires a separate data source for each of its objects: tasks, resources or dependencies.

    Concept

    Bind To Data

    Example

    <dx:ASPxGantt ID="Gantt" runat="server" Width="100%" ClientInstanceName="clientGantt"
        KeyFieldName="ID" ParentFieldName="ParentID" 
        TasksDataSourceID="TasksDataSource" 
        DependenciesDataSourceID="DependenciesDataSource" 
        ResourcesDataSourceID="ResourcesDataSource" 
        ResourceAssignmentsDataSourceID="ResourceAssignmentsDataSource">
        ...
    </dx:ASPxGantt>
    
    <asp:SqlDataSource ID="TasksDataSource" runat="server" 
    ConnectionString='<%$ ConnectionStrings:DevelopmentGanttConnectionString %>' 
    SelectCommand="SELECT * FROM [Tasks]" />
    
    <asp:SqlDataSource ID="DependenciesDataSource" runat="server" 
    ConnectionString='<%$ ConnectionStrings:DevelopmentGanttConnectionString %>' 
    SelectCommand="SELECT * FROM [TaskDependecies]" />
    
    <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]" />
    

    Online Demo

    ASPxGantt - Features

    See Also