There is a ComboBox
on the FMX Form. It is binded with a datasource (table that has an id
-integer and speciality
- varchar fields) in the following manner-
object LinkFillControlToField1: TLinkFillControlToField
Category = 'Quick Bindings'
Control = ComboBox1
Track = True
FillDataSource = BindSourceDB1
FillValueFieldName = 'id'
FillDisplayFieldName = 'speciality'
AutoFill = True
BufferCount = -1
AutoBufferCount = False
FillExpressions = <>
FillHeaderExpressions = <>
FillBreakGroups = <>
end
It is simple to get access to the value of chosen speciality
(from ComboBox1.Selected.Text
) but I can not find a way to access the id
value of the selected item without extra SQL requests. Where is it stored in TComboBox or its ListBox? Where is SelectedValue
stored and how to get it (as integer)?