Skip to main content
A newer version of this page is available. .

TreeListView.ParentFieldName Property

Gets or sets the name of the service field in a data source that contains parent node values. This is a dependency property.

Namespace: DevExpress.Xpf.Grid

Assembly: DevExpress.Xpf.Grid.v18.2.dll

Declaration

public string ParentFieldName { get; set; }

Property Value

Type Description
String

A String value that contains parent node values.

Remarks

To display data in a tree, a data source should contain two additional fields. The first field must contain unique values. Its name is specified by the TreeListView.KeyFieldName property. The second field must contain values that indicate parent nodes for the current node. Its name is specified by the TreeListView.ParentFieldName property. Columns bound to these fields are called service columns.

Note

The data types of the data source fields specified by the TreeListView.KeyFieldName and TreeListView.ParentFieldName properties, must be the same. These values (key and parent) cannot be equal for a node.

To learn more, see Binding to Self-Referential Data Structure.

The following code snippets (auto-collected from DevExpress Examples) contain references 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.

See Also