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

ASPxTreeList.ParentFieldName Property

Gets or sets the data source field which contains parent node values.

Namespace: DevExpress.Web.ASPxTreeList

Assembly: DevExpress.Web.ASPxTreeList.v18.2.dll

Declaration

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

Property Value

Type Default Description
String String.Empty

A String value that specifies the parent field name.

Remarks

Since the ASPxTreeList control is designed to display information in a tree structure, its data source should meet certain requirements. If a data source contains flat data, two additional fields are necessary to build a tree structure.

  • The first field must contain unique values. This field must be assigned to the ASPxTreeList.KeyFieldName property.
  • The second field must contain key values of parent nodes for the current node. It should be assigned to the ParentFieldName property.

Note

The data types of the KeyField and ParentField fields must be the same.

Important

When the ASPxTreeList control is bound to a hierarchical data source (e.g. XmlDataSource), the ASPxTreeList.KeyFieldName and ParentFieldName properties are not in effect.

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