I created this form in VS

The NumPlace TextBox is intalized to 1 automatically, I want when I press on the Enter key to increment the NumPlace automatically in the next row.
This is the code I wrote :
Private Sub DataGridView1_KeyDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles DataGridView1.KeyDown
If e.KeyCode = Keys.Enter Then
MsgBox("Enter key is pressed !")
End If
End Sub
But It doesn’t work it only works when I’m selecting some row end press on “Enter” but when I change the value of the ComboBox or when I select the NumPlace TextBox and then I press on Enter the event doesn’t work.
The solution is to use the event
KeyUpinstead ofKeyDown