-
Posts
5 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Posts posted by cardoso
-
-
It's not possible??
-
How can i set KeyValue to load text of an item on UniDBLookupComboBox when it is with the property "RemoteQuery" set to "True"? When i use a Data Source linked to the "ListSource" this works perfectly. But when i try to do using RemoteQuery, the UniDBLookupComboBox field doesn't display the selected item.
I tried to run manually the event to force item load:
UniDBLookupComboBoxEmployeeRemoteQuery('My item value', UniDBLookupComboBoxEmployee.Items); UniDBLookupComboBoxEmployee.KeyValue := 'My item value';
But it doesn't work, the field keeps empty.
How to reproduce: Add a button to "DBLookupComboBox - Custom Remote Query" example and in the "OnClick" event try to select an item like:
UniDBLookupComboBox1.KeyValue := 1651; // or [].Text := '1651';
-
6 hours ago, cardoso said:
Same problem here.. I'm using trial version 1.90 (latest disponible).
UniDBLookupComboBoxBank.ListSource := FBankController.ReturnDataSource; // Other settings are on .dfm, and it show properly all itens from the database UniDBLookupComboBoxBank.KeyValue := FBankEntity.ID; // It makes no change at all. The KeyField on the component is correct, the record exists, the ID is correct...
I need this to complete my tests on the framework to consider buying it.
I found what i was doing wrong...
The "KeyValue" field should be set when the "TUniDBLookupComboBox" is fully loaded. I changed the event "OnShow" for "OnReady" and it worked.
-
Same problem here.. I'm using trial version 1.90 (latest disponible).
UniDBLookupComboBoxBank.ListSource := FBankController.ReturnDataSource; // Other settings are on .dfm, and it show properly all itens from the database UniDBLookupComboBoxBank.KeyValue := FBankEntity.ID; // It makes no change at all. The KeyField on the component is correct, the record exists, the ID is correct...
I need this to complete my tests on the framework to consider buying it.
Programmatically set DBLookupComboBox item with RemoteQuery
in General
Posted
Maybe giving an answer with another question isn't so useful?
With RemoteQuery set to True, it doesn't work. Its simple.