TreeListSettings.KeyFieldName Property
Gets or sets the name of the data source key field.
Namespace: DevExpress.Web.Mvc
Assembly: DevExpress.Web.Mvc5.v24.2.dll
NuGet Package: DevExpress.Web.Mvc5
#Declaration
#Property Value
Type | Description |
---|---|
String | A String value that specifies the name of the data source key field. |
#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 KeyFieldName property.
- The second field must contain key values of parent nodes for the current node. It should be assigned to the TreeListSettings.ParentFieldName property.
Note
The data types of the Key
Important
When Tree