VB.NET WINDOWS FORM DATAGRIDVIEW

How to make  when i using the Enter key in datagridview in the cell should behave like a tab key ?
please see the below code ,i'm trying to do in the datagridview keyup event to capture the enter key but it doesnt work??
Private Sub ScheduleGradeDataGridView_KeyUp(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles ScheduleGradeDataGridView.KeyUp
            If e.KeyData = Keys.Enter Then
                SendKeys.Send("{tab}")
                e.Handled = True
            End If
        ScheduleGradeDataGridView.SelectionMode = DataGridViewSelectionMode.RowHeaderSelect
    End Sub
mpssg130Asked:
Who is Participating?
 
B_DebasisConnect With a Mentor Commented:
Use KeyDown event instead of KeyUp

0
 
apeterCommented:
Is it going inside the If condition ?
0
All Courses

From novice to tech pro — start learning today.