SelectedItem/SelectedIndex in DropDown ComboBox

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • O.B.

    SelectedItem/SelectedIndex in DropDown ComboBox

    I have a ComboBox as a DropDown list. The following code is executed
    in the form's constructor.

    dropDownComboBo x.Items.Add("AL L");

    The following does nothing.

    dropDownComboBo x.SelectedItem = 0;

    The following also does nothing.

    dropDownComboBo x.SelectedIndex = 0;

    Help?
  • Misbah Arefin

    #2
    Re: SelectedItem/SelectedIndex in DropDown ComboBox

    try
    dropDownComboBo x.ClearSelectio n();
    dropDownComboBo x.Items[0].Selected = true;

    --
    Misbah Arefin


    "O.B." <funkjunk@bells outh.netwrote in message
    news:7462aca2-4ecc-4be5-ad3f-a42cc205ccfc@i7 2g2000hsd.googl egroups.com...
    I have a ComboBox as a DropDown list. The following code is executed
    in the form's constructor.
    >
    dropDownComboBo x.Items.Add("AL L");
    >
    The following does nothing.
    >
    dropDownComboBo x.SelectedItem = 0;
    >
    The following also does nothing.
    >
    dropDownComboBo x.SelectedIndex = 0;
    >
    Help?
    >

    Comment

    Working...