Back to Devexpress

GanttTaskMappingInfo.ParentKey Property

aspnet-devexpress-dot-web-dot-aspxgantt-dot-gantttaskmappinginfo.md

latest2.2 KB
Original Source

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.2.dll

NuGet Package : DevExpress.Web

Declaration

csharp
[DefaultValue("ParentID")]
public string ParentKey { get; set; }
vb
<DefaultValue("ParentID")>
Public Property ParentKey As String

Property Value

TypeDefaultDescription
String"ParentID"

A data field name.

|

Remarks

aspx
<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 EditingRun 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

Bind Gantt To Data

GanttTaskMappingInfo Class

GanttTaskMappingInfo Members

DevExpress.Web.ASPxGantt Namespace