I have the following problem, when I select an item in the TDBComboBox when exiting the component it automatically selects the last record.
DM_BancoInsumos.IBQCons_ForneInsumos.Close;
DM_BancoInsumos.IBQCons_ForneInsumos.Open;
DBComboFornecedor.Items.Clear;
DBComboFornecedor.Items.Add('Selecione');
while DM_BancoInsumos.IBQCons_ForneInsumos.Eof = False do
begin
DBComboFornecedor.Items.Add(DM_BancoInsumos.IBQCons_ForneInsumosCodFornecedor.Text);
DM_BancoInsumos.IBQCons_ForneInsumos.Next;
end;
In the TDBComboBox component:
Style -> csDropDownList
DataSource -> Ds_ConsForncedores
DataFiel -> CodFornecedor
No DataSource
DataSet -> DM_BancoInsumos.IBQCons_ForneInsumos