01-21-2021, 11:21 AM
(01-12-2021, 11:58 AM)KristofVR Wrote: "It basically works just like a std VCL TDBLookupListBox. "
Not entirely.
There seems to be a difference with the VCL component, and that is that the cursor does not change while clicking an object in the list.
For example, this code always returns the result of the last record. In VCL this code gives me the value of column1 for the line that is clicked on.
procedure TIWForm1.IWDBLookupListBox1AsyncClick(Sender: TObject; EventParams: TStringList);
begin
iwedit1.Text:=clientdataset1.FieldByName('Column1').asString ;
end;
That's now how you should do it.
VCL and Web applications *are* different and behave differently too.
You need to inspect the value of the IWDBLookupListBox, not the value of the lookup ClientDataSet.
Try to do
IwEdit1.Text := IWDBLookupListBox1.SelectedValue; // or SelectedText