lorena Posted August 13, 2007 Posted August 13, 2007 when passed DataRow collection with modified row - this is the error message I am getting when I try to update my datagridview. The form is simple (or so I thought) - I just did the drag and drop and let VS2005 do all the code but when I try to update the datagridview, it deletes the information in the cell and I get the error message. Here is my code: Public Class RiskReleaseUsersForm Private Sub TDS_RR_EMPLOYEEBindingNavigatorSaveItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TDS_RR_EMPLOYEEBindingNavigatorSaveItem.Click Me.Validate() Me.TDS_RR_EMPLOYEEBindingSource.EndEdit() Me.TDS_RR_EMPLOYEETableAdapter.Update(Me.RiskReleaseEmployeesDataSet.TDS_RR_EMPLOYEE) End Sub Private Sub RiskReleaseUsersForm_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) _ Handles Me.FormClosing 'Make sure validation events don't keep the form from closing e.Cancel = False 'Show the main menu menuForm.Show() End Sub Private Sub RiskReleaseUsersForm_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 'TODO: This line of code loads data into the 'RiskReleaseEmployeesDataSet.TDS_RR_EMPLOYEE' table. You can move, or remove it, as needed. Me.TDS_RR_EMPLOYEETableAdapter.Fill(Me.RiskReleaseEmployeesDataSet.TDS_RR_EMPLOYEE) End Sub Private Sub ExitToolStripMenuItem_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ExitToolStripMenuItem.Click Me.Close() 'Show the main menu menuForm.Show() End Sub End Class What am I missing? Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.