Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Datagridview blues
Message
Information générale
Forum:
ASP.NET
Catégorie:
Formulaires
Versions des environnements
Environment:
VB 8.0
OS:
Vista
Network:
Windows XP
Database:
Jet/Access Engine
Application:
Desktop
Divers
Thread ID:
01543861
Message ID:
01543866
Vues:
40
>It does not seem to work.

Worked for me - but it sounds as if what you asked for was not what you wanted :-}
The solution below does something different - i.e. makes Enter behave like TAB and skips R/O cells.

>I implemented a base class in the way below , and now it seems to work. Must have picked it up here earlier.
>
>Anyway. Go figure.
>
>
>Public Class dgv
>    Inherits DataGridView
>    Protected Overloads Overrides Function ProcessDialogKey(ByVal keyData As Keys) As Boolean
>        If keyData = Keys.Enter Then
>            Return Me.ProcessTabKey(keyData)
>        Else
>            Return MyBase.ProcessDialogKey(keyData)
>        End If
>    End Function
>    Protected Overrides Sub OnCellEnter(ByVal e As System.Windows.Forms.DataGridViewCellEventArgs)
>        If Me.Columns(e.ColumnIndex).ReadOnly = True Then
>            SendKeys.Send("{TAB}")
>            Exit Sub
>        End If
>        MyBase.OnCellEnter(e)
>    End Sub
>
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform