Page 1 of 1

tDbComboBox, tDbListBox empty

Posted: Wed 02 Mar 2011 17:38
by 777Yves
Hi, I think that I am loosing my mind.

On a simple form I put one
- MyConnection and set it up and active = true
- MyTable set it up and active = true
- MyDataSource set it up
- tDbEdit set up to MyDatasource then select field Gestions
- tDbListBox set up to MyDatasource then select field Gestions
- tDbComboBox set up to MyDatasource then select field Gestions
- tDbGrid set up to MyDatasource

In the VCL
- tDbEdit field Gestions = Gest2011
- tDbListBox no display at all
- tDbComboBox field Gestions = Gest2011
- tDbGrid all fields and data is there

Run this very small application
- tDbEdit field Gestions = Gest2011
- tDbListBox no display at all
- tDbComboBox field Gestions = Gest2011 but the dropdown is empty
- tDbGrid all fields and data is there

I could move from record to record, every component is updated except the tDblistBox is allways empty.
For the tDbComboBox the dropdown is still empty

There is some bad day... :idea:

Posted: Thu 03 Mar 2011 07:55
by Justmade
Everything you mentioned is working perfectly properly.

The DBCombobox and DBListBox always work like this from Delphi 1 up and is not specific to MyDAC..

You have to provide a List on the Component's Items property for the user to select from to make them useful.

Maybe the Devart teams might give your more assistant.

Posted: Thu 03 Mar 2011 12:14
by AndreyZ
Hello,

Such behaviour of TDBComboBox and TDBListBox components is a designed behaviour of all Delphi versions, and it isn't connected with MyDAC. These components allow users to change the field value of the current record to one of a fixed set of choices. It means that you should add the values to the Items property of both components to have a choice of values.

TDBComboBox and TDBListBox

Posted: Thu 03 Mar 2011 12:56
by 777Yves
Hi, you are both rigth.
This was just a bad day, a day where you should stay bed. :shock:

Thanks and if you could, delete this topic.