SelectedIndex Property (FlexComboBase)

Action

Gets the index in the data provider of the selected item.

If there is a prompt property, the selectedIndex value can be set to -1 to show the prompt. If there is no prompt, property then selectedIndex will be set to 0 once a dataProvider is set.

If the ComboBox control is editable, the selectedIndex property is -1 if the user types any text into the text field.

Unlike many other Flex properties that are invalidating (setting them does not have an immediate effect), the selectedIndex and selectedItem properties are synchronous; setting one immediately affects the other.

The default value is -1.

Syntax

C#
protected Integer selectedIndex { get; }
VB
'Declaration
Protected Read Property selectedIndex As Integer

Access

Read only.