When I set the SelectedIndex Value the value is not showing up in the Combobox

A

Anand

Hi All,

I have a combobox with style as DropDown List.

When I set the combobox.selectedIndex = 0, the first value is not showing up
in the combobox and it is simply blank.

Only if I manually pull down the list and pick the value it is showing up.

How can I programatically set the combox value and to show up the selected
value?

Any suggestions Please?

Thanks
Anand Ganesh
 
C

C# Learner

Anand said:
I have a combobox with style as DropDown List.

When I set the combobox.selectedIndex = 0, the first value is not showing up
in the combobox and it is simply blank.

Only if I manually pull down the list and pick the value it is showing up.

Works fine here: setting SelectedIndex to 0 causes the first item to show.

Could you post a short, complete program which demonstrates the problem
(perhaps creating a new demonstration project and posting the contents of
the main form's source file)?
 
M

msnews.microsoft.com

Hi Thanks for the help.

For some reason the event was not triggered. Then somehow I used a different
logic and it helped.

Thanks Again
Anand Ganesh
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top