ASPxTreeList.KeyFieldName Property

Gets or sets the name of the data source key field.

Namespace: DevExpress.Web.ASPxTreeList

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


public string KeyFieldName { get; set; }
Public Property KeyFieldName As String

Property Value

Type Default Description


A String value that specifies the name of the data source key field.


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 KeyFieldName property.
  • The second field must contain key values of parent nodes for the current node. It should be assigned to the ASPxTreeList.ParentFieldName property.

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


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

See Also