Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Expand Minimize

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

Show:
© 2015 Microsoft