Adding a blank row to a combo box thats dataSource is already set
Posted on 2003-12-02
I have a combo box that has a list of customers. that i fill with a dataSet (i do this graphically).
upon load, i fill the dataSet from the SQLDataAdapter and then set the comboBox.text = "" , because i want it to start out empty.
But when i say msgbox combobox.text, it returns the first row of the dataSet.
How do i add a blank row to the combobox? My idea was before filling the dataSet that is bound to the combo to comboBox.items.add("") but this doesnt work because the dataSource is already set.
So what to do?
Also, when I use a dropDownList, i can not set the .text = "", how can i do this, because i dont want to let the user choose a customer that is not in the table?