Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Enter key in data grid
Message
Information générale
Forum:
ASP.NET
Catégorie:
WebForms
Divers
Thread ID:
00772127
Message ID:
00772145
Vues:
17
This message has been marked as the solution to the initial question of the thread.
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.com
www.prenia.com
Weblog: blogs.prenia.com/cathi
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform