display the first item in a combobox

  • Thread starter Thread starter Claudia Fong
  • Start date Start date
C

Claudia Fong

Hi everyone

I have 6 items "inside" the combobox.

I would like to display the first item (eg 2005) when load the form.
Another items in the combobox are 2004,2003,2002,2001 and 2000.

In VB, I only have to write combobox.listitem(0) in the form load and it
will show me the first item, but here in C# is different..

Can someone help me?


Cheers!


Claudi
 
Claudia said:
Hi everyone

I have 6 items "inside" the combobox.

I would like to display the first item (eg 2005) when load the form.
Another items in the combobox are 2004,2003,2002,2001 and 2000.

In VB, I only have to write combobox.listitem(0) in the form load and it
will show me the first item, but here in C# is different..

Can someone help me?
ComboBox.SelectedIndex = 0;
 
Back
Top