Results 1 to 2 of 2

Thread: Blank ComboBox initially

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2003
    Posts
    308

    Blank ComboBox initially

    My form has a Combo Box [Cb] with DropDownStyle property set to DropDownList.
    When the application starts the Combo Box is populated with a Data Table [dt].

    Problem resides in the fact that the Combo Box Selected choice [the one that appears] should be blank initially. However when populating it with the Data Table, the first value from the table automatically appears in the combo box.

    It should be blank until one of the choices are selected.
    Any clues?

  2. #2
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    This will set the combobox to empty value if this is what you are asking about !
    Code:
    Cb.SelectedIndex=-1;

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width