enter key problem in datagridview control
-
I am developing some application using the datagridview control. Inwhich if I press the enter key in any cell the focus move to next row.but I want the focus should move to next cell just like pressing the tab key. How can i solve the problem. Please help
-
I am developing some application using the datagridview control. Inwhich if I press the enter key in any cell the focus move to next row.but I want the focus should move to next cell just like pressing the tab key. How can i solve the problem. Please help
make the class below.run the program and add the control to your project.
Public Class MyDataGridView
Inherits DataGridView
Protected Overrides Sub OnKeyDown(ByVal e As System.Windows.Forms.KeyEventArgs)
If e.KeyCode = Keys.Enter ThenDim j As New System.Windows.Forms.KeyEventArgs(Keys.Tab) MyBase.OnKeyDown(j) Else MyBase.OnKeyDown(e) End If End Sub
End Class
A.E.K