When a user wants to delete a row in a DGV, they are asked if they are sure they want to do it.
My question is how do I go about stopping the row from being deleted should they say no?
Any help would be appreciated.Code:Private Sub RoomCodesDGV_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles RoomCodesDGV.KeyDown Select Case e.KeyCode Case Keys.Delete If MsgBox("Are You Sure That You Want To Delete This Line? ", MsgBoxStyle.Question & MsgBoxStyle.YesNo, "Delete Room Code") = MsgBoxResult.No Then ?????? End If End Select End Sub
Computerman![]()





Reply With Quote