The SelectedIndex value of the comboBox cannot be set in the designer
I'm using Rider 2025.3.2, .NET 8, Windows 10 19044, and working on a WinForms project. After placing a ComboBox1 control on the form, I cannot find the SelectedIndex property in the designer's Properties panel, making it impossible to assign a value to it. I have tried clearing the cache, but the issue still persists. When I manually add the code comboBox1.SelectedIndex = 0 in Form1.Designer.cs and then place another ComboBox2 control on the form, the code comboBox1.SelectedIndex = 0 disappears automatically.
Please sign in to leave a comment.
Hello,
I wasn't able to assign SelectedIndex through the designer also: neither in Rider nor in Visual Studio.
You might consider setting the default value for this property in the Form.cs file: in the constructor after the InitializeComponents().
Hope this helps.