Skip to main content

TreeListSettings.ParentFieldName Property

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

Namespace: DevExpress.Web.Mvc

Assembly: DevExpress.Web.Mvc5.v24.1.dll

NuGet Package: DevExpress.Web.Mvc5

Declaration

public string ParentFieldName { get; set; }

Property Value

Type Description
String

A String value that specifies the parent field name.

Remarks

Since TreeList 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 TreeListSettings.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 TreeList is bound to a hierarchical data source (e.g. XmlDataSource), the TreeListSettings.KeyFieldName and ParentFieldName properties are not in effect.

See Also