RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TDBComboBox.DataField Property

Identifies the field from which the combo box displays data.

Pascal
property DataField: WideString;
C++
__property BSTR DataField;

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.
 

DataSource 

Field 

Items 

TDBLookupComboBox 

Using TDBListBox and TDBComboBox

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!