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:
01543863
Views:
36
It does not seem to work.

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

If things have the tendency to go your way, do not worry. It won't last. Jules Renard.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform