[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.Forms.ISelector.SelectedIndex

SelectedIndex Property

SelectedIndex

Gets or sets the selected index of this control.

Returns the zero-based index of the currently selected item. Returns -1 if no item is selected.

@apiNote Not fully supported by the *.ssjson format.
Declaration
int SelectedIndex { get; set; }
Property SelectedIndex As Integer
Examples
ISelector selector = worksheet.Controls.AddDropDown(20, 20, 120, 20);
worksheet.Range["A1:A3"].Value = new object[,] {{"Pending"}, {"Approved"}, {"Rejected"}};
selector.ItemsSourceRange = worksheet.Range["A1:A3"];
selector.SelectedIndex = 1;
int selectedIndex = selector.SelectedIndex;