Combobox1.item.clear problem

  • Thread starter Thread starter feng
  • Start date Start date
F

feng

The Combobox1.item.clear doesn't seem to work for me
correctly. I have a Combox with a datasource bind to it.
When I try to clear the Combobox with the following code:

Combobox1.DataSource = Nothing
Combobox1.items.Clear

Even though the items in the dropdown list are gone now, I
still see one line showing in the combo:
System.Data.DataRowView.
What should I do about this?

Thanks

Lifeng
 
Lifeng,

You can set the text to an empty string after clearing the items:



Combobox1.DataSource = Nothing
Combobox1.items.Clear
Combobox1.Text = ""

hope that helps...

Steve Stein
VB Team

This posting is provided "AS IS" with no warranties and confers no rights.

--------------------
 
Back
Top