select items in winform dropdown style combobox...

  • Thread starter Thread starter trint
  • Start date Start date
T

trint

In my winform, I have 3 dropdown style comboboxes. I want the program
to always start with
the "Todays date" to be selected in the three comboboxes.

example of todays date selected by using all three combo dropdown
boxes:
cboDropDownStyle1 = June | cboDropDownStyle2 = 26 | cboDropDownStyle3
= 2007

Those items already exist in the comboboxes, I just want them
automatically selected when the program starts selecting correct items
reflecting TODAY'S date.
I know how to get todays date and all, just don't know how to SELECT
the items
in the dropdown comboboxes.

Any help is appreciated,
Thanks,
Trint
 
Try this
cboDropDownStyle.SelectedItem = ThisMonth;
OR
cboDropDownStyle.SelectedIndex = 5;

Ravi
 
Back
Top