Hi Mufi,
To move horizontally in a DataGrid you need to use the TAB key instead of ENTER. You can add this functionality to your DataGrid by creating a subclass of the DataGrid and build the ENTER key in. Here is an example:
Public Class ctlDatagridEnter
Inherits DataGrid
Protected Overrides Function ProcessCmdKey(ByRef msg As System.Windows.Forms.Message, _
ByVal keyData As System.Windows.Forms.Keys) As Boolean
If msg.WParam.ToInt32() = CInt(Keys.Enter) Then
SendKeys.Send("{Tab}")
Return True
End If
Return MyBase.ProcessCmdKey(msg, keyData)
End Function
End Class
>hi,
>every body,
>
>i using data grid in vb.net but when i press enter key on keyboard cursor does't move to next cell horizontaliy.
>
>thanks
-----------------------------------------
Cathi Gero, CPA
Prenia Software & Consulting Services
Microsoft C# / .NET MVP
Mere Mortals for .NET MVP
cgero@prenia.comwww.prenia.comWeblog: blogs.prenia.com/cathi