Combobox.Items.Clear not working!
I load a Combobox with the following code:
Code:
Public colCustomers As List(Of Customers) = Nothing
Public Sub LoadCustomers(ByVal cbx As ComboBox)
If colCustomers Is Nothing Then
colCustomers = LoadCustomerList()
End If
cbx.Items.Clear()
For Each Customer In colCustomers
'Code to Add Customers
Next
End Sub
I need to be able to call this function again and have it clear the combobox and reload the Customer List into it. However, when I call the function a second time, it leaves the name of the last Customer that was selected. cbx.SelectedIndex = -1, but cbx.Text = "Customer Name". I need this combobox to be completely cleared out with nothing selected and nothing displayed. Why doesn't cbx.Items.Clear clear the cbx completely?
I'd rather be wakeboarding...