By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
449,423 Members | 1,294 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 449,423 IT Pros & Developers. It's quick & easy.

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

P: n/a
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
Nov 16 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Anand <an**********@hotmail.com> wrote:
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)?
Nov 16 '05 #2

P: n/a
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
"C# Learner" <cs****@learner.here> wrote in message
news:19***************@csharp.learner...
Anand <an**********@hotmail.com> wrote:
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)?

Nov 16 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.