I have a combobox of states in my register, where I connect via livebindings with an FDMemTable to save the data in the database. How could I get the index item of the selected item in the combo?
The only bidirectional binding I found was SelectedValue, only it returns the string of the item and I need the index.
I do not want to load my combo from an FDQuery or FDMemTable
I'm using the following code:
ACombo.Items.AddObject(GetPropValue(FListaCombo.Items[I], FCampoDescricao), FListaCombo.Items[I]);
I use RAD Studio XE 10.2
Edited:
Note: My project is in firemonkey (FMX)
The ItemIndex generates a one-way link