I have few items on my ComboBox
items collection, and i'd like to select one item from this list and set it as default item - when app starts - this item is already on comboBox
.
I'm trying something like that:
SelectPrint11.SelectedIndex=2;
but error is:
System.ArgumentOutOfRangeException: InvalidArgument=Value of '2' is not valid for 'SelectedIndex'
Edit:
In mylist
are 3 items, Printer1
, Printer2
, Printer3
. All are added in ComboBox Properties -> Items -> Collection