Search code examples
databasedelphicomboboxlookupdelphi-xe

Delphi XE3: DBLookupCombo Dropdown side effect


We are porting a D6 application to XE3.

In D6 I inherited a complex code which used shared datasets and datasources everywhere.

This worked well in D6.

After we could run the XE3 version, we experienced that lookup combo boxes changed.

On dropdown they reset the other dropdown's keyvalues (everywhere in the program)!

If two dropdowns use on dataset, and if I click on the first to down it, and select, on down the second keyvalue changed to NULL; and reverse - if I click on the second, the first's keyvalue change to NULL...

This is global in this program, so I need to find fast solution.

May somebody have any information about this "bug" (or "feature"? :-) ), or have a solution in his/her hand?

Thanks for any answer!


Solution

  • This is intentional. Take a look at the implemention of TCustomDBLookupComboBox.ListLinkDataChanged; in Vcl.DBCtrls. You will find the comment:

      { Fix for Defect# 204311, Non-bound control should clear when list datasource changes }