Page 1 of 1

Dropdown menu

Posted: Tue Mar 04, 2025 9:56 am
by Evangeline
Hi,

I've set up a dropdown menu that is populated with options from my database. The issue I'm facing is that when the form loads, the first option in the dropdown is automatically selected. I want to ensure that no option is selected by default. Is there a way to achieve this?

I've tried manipulating the dropdown in the form's load event and/or the Page1.AfterLoad event:

Code: Select all

csharp
var dropdown = myForm.Controls["myDropdown"] as ComboBox;
dropdown.SelectedIndex = -1; // Attempt to set no selection
or slope

Code: Select all

csharp
var dropdown = myForm.Controls["myDropdown"] as ComboBox;
dropdown.Text = ""; // Trying to clear the selection
Any suggestions on how to resolve this?

Re: Dropdown menu

Posted: Tue Mar 04, 2025 11:00 am
by Lech Kulikowski
Hello,

What form do you mean? What product and version are you use?

Thank you.