There is a sorting error in C# in Combobox when using AutoCompleteMode with mode Suggest and AutoCompleteSource is ListItems.
Example: Combobox contains items: "Svedberg", "Swedbank", "Swedish"
When typing "Sw" in Combobox I should get two items suggested, "Swedbank" and "Swedish". Problem is that only "Swedbank" is shown. It seems that C# sorts the items as: "Swedbank", "Svedberg", "Swedish"
If I could C# to use StringComparer.Ordinal it would solve the problem, since Ordinal sorting seems to work better.
Any ideas on how to solve this problem?
System.Windows.Forms.ComboBox comboBox1; this.comboBox1 = new System.Windows.Forms.ComboBox(); this.comboBox1.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest; this.comboBox1.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems; this.comboBox1.FormattingEnabled = true; this.comboBox1.Items.AddRange(new object[] { "Svedberg", "Swedbank", "Swedish"}); this.comboBox1.Location = new System.Drawing.Point(142, 474); this.comboBox1.Name = "comboBox1"; this.comboBox1.Size = new System.Drawing.Size(121, 21); this.Controls.Add(this.comboBox1);