[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.Forms.IListBox.SelectedItems

SelectedItems Property

SelectedItems

Gets the currently selected items.

Returns the collection that represents the current selection in the list box. When the selection mode allows multiple selection, the collection can contain more than one item.

Declaration
ICollection<ListBoxItem> SelectedItems { get; }
ReadOnly Property SelectedItems As ICollection(Of ListBoxItem)
Examples
IListBox listBox = worksheet.Controls.AddListBox(20, 20, 120, 60);
listBox.Items.Add(new ListBoxItem("North"));
listBox.Items.Add(new ListBoxItem("South"));
listBox.SelectionMode = SelectionMode.Extended;
listBox.SelectedItems.Add(listBox.Items[0]);
var selectedItems = listBox.SelectedItems;