A newer version of this page is available. Switch to the current version.

LookUpColumnInfo.FieldName Property

Gets or sets the field name whose values are displayed in the column.

Namespace: DevExpress.XtraEditors.Controls

Assembly: DevExpress.XtraEditors.v19.2.dll

Declaration

[DefaultValue("")]
[DXCategory("Data")]
public string FieldName { get; set; }

Property Value

Type Default Description
String

String.Empty

The name of the field whose values are displayed in the column.

Remarks

Use the FieldName property to bind the column to a specific field. Binding to nested fields (e.g., Address.Country) is not supported. If binding to nested fields is required, use the GridLookUpEdit control instead.

If FieldName refers to a field from the editor's RepositoryItemLookUpEditBase.DataSource, the column is populated automatically with values from this field.

It is possible to create unbound columns, i.e., columns which you should populate manually by handling the RepositoryItemLookUpEdit.GetNotInListValue event. To do this, you must set its field name to a string that does not match any field name within the RepositoryItemLookUpEditBase.DataSource. Refer to the RepositoryItemLookUpEdit.GetNotInListValue topic for an example.

Use the LookUpColumnInfo.Caption property to specify the string to display in the header panel for the current column.

See Also