(so the data keeps even when the file is shut)
You then add code that tells the combo box to add a new row with the data typed into the combo box ie the text if the datatable does not allready contain the typed text.
Ps i use visual basic 2008 express version
What code would be used if it has been bound to a datacolumn called :
dataset1.datatable1.column1
assuming the combo box is called : combobox1
From what i tried i managed to get this :
Expand|Select|Wrap|Line Numbers
- Private Sub ComboBox1_LostFocus(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox1.LostFocus
- If Not DataTable1.Rows.Contains(ComboBox1.Text) Then
- DataTable1.NewRow()
- Exit Sub
- End If
- ComboBox1.Refresh()
- End Sub