I am trying to add a KeyDown event for a datagrid, specifically to catch the Delete key to Delete the row of data. The DataGrid is set to ReadOnly, but it seems like half the time I press Delete the row tries to go into edit mode and the event never fires. Anybody have any idea what would cause this? Here's the event code:

Private Sub dgMaintenance_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles dgMaintenance.KeyDown
Dim mbrResult As MsgBoxResult ' Confirmation result
Dim boolResult As Boolean ' Delete result

' If a row is selected
If e.KeyCode = Keys.Delete And dgMaintenance.CurrentRowIndex > -1 Then

' Confirm they want to do this
mbrResult = MsgBox("Are you sure you wish to delete this Scheduled Maintenance?", _
MsgBoxStyle.YesNo, "Warning! Scheduled Maintenance Deletion")

' If Deletion is confirmed
If mbrResult = MsgBoxResult.Yes Then

' Attempt to Delete this Scheduled maintenance
boolResult = oNRS_SQL.DeleteMaintenanceRecord(dgMaintenance.Item(dgMaintenance.CurrentRowIndex, 0))

' If Deletion is not successful
If boolResult = False Then
' Pop an error message
MsgBox("Unable to delete Scheduled Maintenance", MsgBoxStyle.Critical, "Database Error")
Else
' Reload the Maintenance schedule
oNRS_SQL.LoadMaintenanceSchedule(m_intResourceID)

End If
End If

End If
End Sub