Spread Windows Forms 15.0
GrapeCity.Win.PluginInputMan Assembly / GrapeCity.Win.Spread.InputMan.CellType Namespace / GcComboBox Class / SelectedItem Property

In This Topic
    SelectedItem Property (GcComboBox)
    In This Topic
    Gets or sets a ListItem value indicates the selected item in the dropdown list.
    Public Property SelectedItem As ListItem
    Dim instance As GcComboBox
    Dim value As ListItem
    instance.SelectedItem = value
    value = instance.SelectedItem
    public ListItem SelectedItem {get; set;}

    Property Value

    A ListItem object.
    The default is a null reference (Nothing in Visual Basic).
    When you set the SelectedItem property to an object, the GcComboBox attempts to make that object the currently selected one in the list. If the object is found in the list, it is displayed in the edit portion of the GcComboBox and the SelectedIndex property is set to the corresponding index. If the object does not exist in the list, the SelectedIndex property is left at its current value. The GcComboBox class searches for the specified object by using the ListItemCollection.IndexOf method.
    See Also