From RAD Studio API Documentation
Jump to: navigation, search


property DataField: string read GetDataField write SetDataField;


__property System::UnicodeString DataField = {read=GetDataField, write=SetDataField};


Type Visibility Source Unit Parent
property published
Vcl.DBCtrls TDBComboBox


Identifies the field from which the combo box displays data.

Set DataField to specify which field is represented by the combo box. (Note that this is does not refer to the source of the list, but to the field into which the selected value is inserted. The list values must be supplied manually using the Items property.) The combo box displays the current value of this field, and allows the user to set the value of this field on the current record. The dataset the field is located in is specified by the DataSource property.

DBComboBox1.DataField := 'CountryName';

DBComboBox1->DataField = "CountryName";

Tip: For a data-aware combo box component, where the list values are automatically supplied, use a TDBLookupComboBox instead.

See Also