Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Datagridview blues
Message
General information
Forum:
ASP.NET
Category:
Forms
Environment versions
Environment:
VB 8.0
OS:
Vista
Network:
Windows XP
Database:
Jet/Access Engine
Application:
Desktop
Miscellaneous
Thread ID:
01543861
Message ID:
01543866
Views:
39
>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
>
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform