Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multiple DBLookupComboBox tied to the same ListSource in XE4

Status
Not open for further replies.

topcat01

Programmer
Jul 10, 2003
83
GB
Hi List,

I have a single form with several DBLookupComboBox components tied to the same dataset same ListSource/ListField/KeyField. When I select a different value from any of the lists, all lists clear!

In Delphi 7, it was possible to select a different record of the dataset in each DBLookupComboBox, each of them storing and holding their own record, without issue. In Delphi XE4, this is no longer the case and as soon as I click on any of the DBLookupComboBox components and its dropdown list appears and before any selection is made, all of the other DBLookupComboBox components on the form are reset...

Any suggestions as to workaround this would be greatly appreciated as I am pulling out my hair :(

Thank you
 
Could it be that you are putting your DataSource (not listsource) in Insert Mode when the DBLookupComboBox drops down? That would explain why all of them are cleared, the New record has no values (null values) for the combobox to resolve against the listsource.
 
Thanks for the suggestion, I traced the problem, the dropdown was using an incorrect datasource during runtime (using different conditional during compile)

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top