Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to handle keypress event in datagridview cell
Message
De
11/01/2009 12:03:45
 
 
À
08/01/2009 23:40:17
Arjun Bagojikop
Dynamic Super Software
Sangli, Inde
Information générale
Forum:
ASP.NET
Catégorie:
Formulaires
Versions des environnements
Environment:
VB 8.0
OS:
Windows XP SP2
Network:
Windows XP
Database:
MS SQL Server
Application:
Desktop
Divers
Thread ID:
01370794
Message ID:
01372651
Vues:
28
Glad you got it working, Arjun!! =0)

But your solution made me curious about something. I had heard about and have used the ProcessCmdKey method, but this was the first time I'd seen the ProcessDialogKey method. So I wondered what the differences were. I found two excellent articles on keystroke processing that I highly recommend:

http://blogs.msdn.com/jfoscoding/archive/2005/01/24/359334.aspx
http://www.devx.com/dotnet/Article/39607/1763/page/1

Happy reading!

~~Bonnie




>thanks a lot for aditional info.
>
>i got my result
>
>Public Class dssgridview
>    Inherits DataGridView
>    Sub New()
>        Me.AutoGenerateColumns = False
>
>    End Sub
>    Protected Overrides Function ProcessDialogKey( _
>           ByVal keyData As Keys) As Boolean
>        ' Extract the key code from the key value. 
>        'Dim key As Keys = keyData And Keys.KeyCode
>        'MsgBox("OK")
>
>        ' Handle the ENTER key as if it were a RIGHT ARROW key. 
>        If keyData = Keys.Enter Then
>
>            Me.ProcessRightKey(keyData)
>            'SendKeys.Send("{tab}")
>            Return False
>
>        End If
>        Return MyBase.ProcessDialogKey(keyData)
>    End Function
>
>End Class
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform