If you would like to select "right cell" (my best guess: on the right side of current cell), you need to set
DataGridView.CurrentCell Property (System.Windows.Forms) | Microsoft Docs[
^]
Get and Set the Current Cell in DataGridView Control - Windows Forms | Microsoft Docs[
^]
[
EDIT]
OK, seems you want to change Enter key behaviour... I'd suggest to use
KeyUp
event.
Private Sub DataGridView1_KeyUp(sender As Object, e As KeyEventArgs) Handles DataGridView1.KeyUp
If Label1.Text = "0" Then Exit Sub
If e.KeyCode <> Keys.Enter Then Exit Sub
Dim dgc As DataGridViewCell = DataGridView1.CurrentCell
If dgc Is Nothing Then Exit Sub
Dim c As Integer = dgc.ColumnIndex + 1
Dim r As Integer = dgc.RowIndex - 1
If c > DataGridView1.Columns.Count - 1 Then c = 0 : r += 1
If r < 0 Then r = 0
dgc = DataGridView1(c, r)
If dgc Is Nothing Then Exit Sub
Me.DataGridView1.CurrentCell = dgc
Me.DataGridView1.CurrentCell.Selected = True
End Sub
You can create custom DataGridView control based on existsing one and then change Enter key behaviour in
OnKeyUp
event. See:
Enter Key in DataGridView : C# 411[
^]