This documentation is archived and is not being maintained.

Data binding for ComboBox or ListBox is read-only

Visual Studio .NET 2003

In Visual Basic 6.0, a ComboBox or ListBox control could be bound to a database using ADO; when a value in the control was changed, the database was updated. In Visual Basic .NET, data binding for the ComboBox Control (Windows Forms) and ListBox Control (Windows Forms) controls is read-only when a user changes the value by selecting an item from the list. When the value in the database changes, the control is updated, but when the value in the control is changed, the database is not updated.

Note   For the ComboBox control, changing the value by typing in the TextBox portion of the control does update the database.

What to do next

Add code to the ListControl.SelectedValueChanged Event event for the ComboBox or ListBox controls to update the database.

See Also

ComboBox Control Changes in Visual Basic .NET | ListBox Control Changes in Visual Basic .NET | Data Changes in Visual Basic .NET