V
vbt
I am new to using the DataGridView and I have read most everything I can
find on this subject. But obviously I am not see the hole picture.
I am trying to update a data base using the DataGridView.
The DataGridView displays the data correctly when the program is run. I am
able to change the data in a cell but when I reload the data base the
changes were never updated.
DataGridView.DataSource = GroupDataBindingSource
DataGridView.EditMode = EditOnEnter
DataGridView.ColumnsReadOnly = False
The following is the code I am using to save the data:
Private Sub SaveGroupData()
Try
Me.Validate()
Me.GroupDataBindingSource.EndEdit()
'This line of code saves data into the
Group_DBDataSet.Group_Data' table.
Me.Group_DataTableAdapter.Update(Me.Group_DBDataSet.Group_Data)
Catch ex As Exception
Dim msg As String
msg = " Sub SaveGroupData " & vbCrLf & vbCrLf
MsgBox(msg & ex.ToString) ' Show friendly error message.
Finally
End Try
End Sub
Any help will be appreicated
find on this subject. But obviously I am not see the hole picture.
I am trying to update a data base using the DataGridView.
The DataGridView displays the data correctly when the program is run. I am
able to change the data in a cell but when I reload the data base the
changes were never updated.
DataGridView.DataSource = GroupDataBindingSource
DataGridView.EditMode = EditOnEnter
DataGridView.ColumnsReadOnly = False
The following is the code I am using to save the data:
Private Sub SaveGroupData()
Try
Me.Validate()
Me.GroupDataBindingSource.EndEdit()
'This line of code saves data into the
Group_DBDataSet.Group_Data' table.
Me.Group_DataTableAdapter.Update(Me.Group_DBDataSet.Group_Data)
Catch ex As Exception
Dim msg As String
msg = " Sub SaveGroupData " & vbCrLf & vbCrLf
MsgBox(msg & ex.ToString) ' Show friendly error message.
Finally
End Try
End Sub
Any help will be appreicated