Vcl.DBCtrls.TDBComboBox.DataField
Delphi
property DataField: string read GetDataField write SetDataField;
C++
__property System::UnicodeString DataField = {read=GetDataField, write=SetDataField};
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
property | published | Vcl.DBCtrls.pas Vcl.DBCtrls.hpp |
Vcl.DBCtrls | TDBComboBox |
Description
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.