As AdvDBLookupComboBox drops down and a selection is make (using db connections)
Header="Company"
rec1="Co1" <-- after AdvDBLookupComboBox closes
rec2="Co2"
rec3="Co3" <-- is selected
It appears that when the combobox closes the dataset always resets to the first record.
leaving AdvDBLookupComboBox.text always = "Col1"
is there a way around this? so far I've been using a global var which is set in the "OnClose" event
i.e.
Var g_Str: String;
...
procedure Tfrm_Main.AdvDBLookupComboBox1Closed(Sender: TObject);
begin
g_Str := AdvDBLookupComboBox1.Text;
end;
Thanks
This cannot be reproduced here. Please check our demo ALCDEMO.DPROJ where we do not see this behavior. What is different in your project from this sample?
Sorry I copy & pasted the incorrect component. I'm seeing this behavior on the
AdvGridDropDown
I do not understand how TAdvGridDropDown could have this behavior as this component is not DB-aware.
My humble apologies. The fault was in my code. I found a sub routine that was iterating though the database causing the “reset” back to the first record.
Sometimes working though the night on multiple projects do not work well in maintaining clear thought.
Again sorry for the trouble. I do appreciate your efforts.