I need to add "Select more..." to the bottom of the combobox items, like it done on SQL 2008 servers selector. Trying like this:
List<string> srvList = new List<string>();
srvList.Add("ff");
srvList.Add("jj");
srvList.Add("pp");
srvList.Add("<Select more...>");
ComboBoxServs.Items.AddRange(srvList.ToArray<String>());
But "Select more..." appears at the top of items.
As MSDN says:
If the Sorted property of the ComboBox is set to true, the items are inserted into the list alphabetically. Otherwise, the items are inserted in the order they occur within the array.
Try to set Sorted
property to false
:
ComboBoxServs.Sorted = false;
List<string> srvList = new List<string>();
srvList.Add("ff");
srvList.Add("jj");
srvList.Add("pp");
srvList.Add("<Select more...>");
ComboBoxServs.Items.AddRange(srvList.ToArray<String>());
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With