ComponentOne Calendar for ASP.NET Web Forms
C1.Web.Wijmo.Controls.45 Assembly / C1.Web.Wijmo.Controls.C1ComboBox Namespace / C1ComboBox Class / SelectedItems Property
Example

In This Topic
    SelectedItems Property
    In This Topic
    Gets the SelectedItems of C1ComboBox.
    Syntax
    'Declaration
     
    Public Overridable ReadOnly Property SelectedItems As C1ComboBoxItem()
    public virtual C1ComboBoxItem[] SelectedItems {get;}
    Example
    C1ComboBox c = new C1ComboBox();
    c.Items.Add(new C1ComboBoxItem("test1"));
    c.Items.Add(new C1ComboBoxItem("test2"));
    c.SelectionMode = C1ComboBoxSelectionMode.Multiple;
    ArrayList indicesToSelect = new ArrayList();
    indicesToSelect.Add(0);
    indicesToSelect.Add(1);
    // select 2 items.
    c.SelectedIndices = indicesToSelect;
    C1ComboBoxItem[] items = new C1ComboBoxItem[2];
    items = c.SelectedItems;
    See Also