Back to Devexpress

TreeListMappings.ParentFieldName Property

windowsforms-devexpress-dot-xtragantt-dot-treelistmappings-a866098e.md

latest2.9 KB
Original Source

TreeListMappings.ParentFieldName Property

Gets or sets the data source field that identifies each record’s parent.

Namespace : DevExpress.XtraGantt

Assembly : DevExpress.XtraGantt.v25.2.dll

NuGet Package : DevExpress.Win.Gantt

Declaration

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

Property Value

TypeDefaultDescription
String"ParentID"

The parent identifier field name.

|

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the ParentFieldName property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

winforms-dashboard-custom-items-extension/CS/CustomItemExtension/CustomItems/GanttItem/GanttItemControlProvider.cs#L97

csharp
gantt.Columns.Clear();
gantt.TreeListMappings.KeyFieldName = gantt.TreeListMappings.ParentFieldName = gantt.ChartMappings.TextFieldName
    = gantt.ChartMappings.StartDateFieldName = gantt.ChartMappings.FinishDateFieldName = string.Empty;

winforms-dashboard-custom-items-extension/VB/CustomItemExtension/CustomItems/GanttItem/GanttItemControlProvider.vb#L95

vb
gantt.ChartMappings.TextFieldName = gantt.ChartMappings.StartDateFieldName
gantt.TreeListMappings.ParentFieldName = gantt.ChartMappings.TextFieldName
gantt.TreeListMappings.KeyFieldName = gantt.TreeListMappings.ParentFieldName

See Also

TreeListMappings Class

TreeListMappings Members

DevExpress.XtraGantt Namespace