Vcl.DBCtrls.TDBLookupComboBox.DataField

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property DataField: string read FDataFieldName write SetDataFieldName default 0;

C++

__property DataField = {default=0};

Properties

Type Visibility Source Unit Parent
property published
Vcl.DBCtrls.pas
Vcl.DBCtrls.hpp
Vcl.DBCtrls TDBLookupComboBox

Description

Identifies the field whose value is represented by the lookup control.

Vcl.DBCtrls.TDBLookupComboBox.DataField inherits from Vcl.DBCtrls.TDBLookupControl.DataField. All content below this line refers to Vcl.DBCtrls.TDBLookupControl.DataField.

Identifies the field whose value is represented by the lookup control.

Use DataField to bind the lookup control to a field in the dataset specified by the DataSource property. The DataField is the field whose value can be set by the lookup control, not the field which supplies the lookup values that are displayed by the lookup control.

If DataField specifies a lookup field component, there is no need to set the KeyField or ListField properties, as the field component contains all the information about the relationship between the data field value and the lookup value.

See Also