Murray Brown
asked on
VB.net DataGridView Uncommitted row cannot be deleted
Hi. I am using the following code to delete rows in an unbound DataGridView
It works for any row except where the DGV_RowIndex is zero
where I get the error "Uncommitted row cannot be deleted"
Me.DGV_Joins.Rows.Remove(M e.DGV_Join s.Rows(DGV _RowIndex) )
It works for any row except where the DGV_RowIndex is zero
where I get the error "Uncommitted row cannot be deleted"
Me.DGV_Joins.Rows.Remove(M
Try calling DataGridView.EndEdit first.
ASKER
Hi. I tried that and it caused the error to happen on all rows
Stupid DataGridView!! What do you mean "all rows"? Are you deleting more than 1 row? Are you using a For Each?
ASKER
Hi. I tried one row at a time. Previously the error just happened on the first row but now if I try and delete any other row I get the error
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks Bob