aspnet-devexpress-dot-web-dot-aspxgantt-dot-gantttaskmappinginfo.md
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
[DefaultValue("ParentID")]
public string ParentKey { get; set; }
<DefaultValue("ParentID")>
Public Property ParentKey As String
| Type | Default | Description |
|---|---|---|
| String | "ParentID" |
A data field name.
|
<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:
nullSee Also