Reselect item after requery in delphi firemonkey and livebindings


I have a Delphi-Firemonkey-Android program. It has a TListBox, named lst1 and a database query. I hooked it up with live bindings like this:

This is what I have in LiveBindings

What I do is select an item in the listbox, then some processing in the Db, and finally close and open the query. Now the list will scroll to the top, but I want to keep the selected item in the listbox.

I know I can get the selected DeliveryId (which is unique per item) in the Listbox by readig:


But how do I select the item corresponding the DeliveryId I saved before closing and opening the dataset?
GetSelectedValue is readonly and it wont help relocate the query.

Thanks in advance

Comments are closed.