Skip to main content
All docs
V25.1
  • GanttTaskMappingInfo.ParentKey Property

    Specifies the name of the data field that contains information on the task’s parent ID.

    Namespace: DevExpress.Web.ASPxGantt

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

    NuGet Package: DevExpress.Web

    Declaration

    [DefaultValue("ParentID")]
    public string ParentKey { get; set; }

    Property Value

    Type Default Description
    String "ParentID"

    A data field name.

    Remarks

    <dx:ASPxGantt ID="Gantt" runat="server" Width="100%" KeyFieldName="ID" ParentFieldName="ParentID" ...>
        <Mappings>
            <Task Key="ID" ParentKey="ParentID" Title="Subject" Start="StartDate" End="EndDate" Progress="PercentComplete" />
            <%-- ... --%>
        </Mappings>
        <%-- ... --%>
    </dx:ASPxGantt>
    

    Run Demo: ASPxGantt - Data Binding and Editing Run Demo: MVC Gantt - Data Binding and Editing

    The Gantt control does not show the tasks whose parents are not present in the data source. To display a root task (without a parent), set its parent key value to one of the following values:

    See Also