You right I have mistake. I check it again, and I realize that this line is
not necessary:
Sub OnDel (ByVal sender As Object, ByVal e As
System.Data.DataRowChangeEventArgs)
=>> If e.Action = DataRowAction.Commit Then Exit Sub
But you see that I divide my code between RowDeleted and RowDeleting.
At first I try to put all in RowDeleted. But the problem is, when MsgBox
appear,
the user not see the row that he start delete, and the grid stand on next
row.
I try fix it by calling RejectChange, and then after user confirm call
row.delete
Within this event, this cause deadlock. Therefor, I divide code.
By the way, if you use RowChange Event to Update DB (that call to RowChange
again),
the first line on the event must:
If e.Action = DataRowAction.Commit then exit sub