I have search this one, and most of the answer are in C# and I have try to convert it to VB.NET and do a work around but I cannot find the right code.
What I want is when the user press Enter, it will move to the next column, if the column in that row is last, then it will go down to the second row of the first column.
Thank you.
EDIT:
If e.KeyCode = Keys.Enter Then
e.Handled = True
With dvJOBranch
Dim i As Integer = .CurrentCell.ColumnIndex + 1
.CurrentCell = .CurrentRow.Cells(i)
End With
End If
This code is working but for columns that are not editing, if I am editing in a columns, its not working and this is the error: Current cell cannot be set to an invisible cell.
Best Answer
this should do the trick
and this will address the "edit" problem mentioned.