Skip to main content

ASPxTreeList.KeyFieldName Property

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

Namespace: DevExpress.Web.ASPxTreeList

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

NuGet Package: DevExpress.Web

Declaration

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

Property Value

Type Default Description
String String.Empty

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

Remarks

The data source you bind to the ASPxTreeList control should contain the following fields:

  • A Key field - a field that specifies a unique key value for each node. Assign the name of this field to the KeyFieldName property.

  • A Parent field - a field that specifies the key value of the parent node for each node. Assign the name of this field to the ParentFieldName property.

The data types of the Key and Parent fields must be the same.

Important

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

See Also