1
I have a states combobox 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 item string and I need the index.
I don’t 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)
Itemindex generates a one-way link
Selectedvalue generates a bidirectional link, only it only returns the text and I want the index (or id)
I don’t know if I explained myself well, but I would like to get the index using livebinds
– Matheus Ribeiro
@Matheusribeiro all right, check the answer edition.
– Junior Moreira
This CTRL+N procedure I already knew, the problem is that even with this command I could not find a property that is bidirectional that returns the index of the selected item
– Matheus Ribeiro
To
ItemIndex
doesn’t work? which version of Delphi?– Junior Moreira
Good every time Inko with Itemindex is generated a unidentional Binding , only I want a bidirectional. I am using RAD Studio 10.2.2 Tokyo
– Matheus Ribeiro
check the question edition
– Matheus Ribeiro