16,554
社区成员
发帖
与我相关
我的任务
分享
Private Sub DataGridView1_KeyDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles DataGridView1.KeyDown
If e.KeyData = Keys.Enter OrElse e.KeyData = Keys.Tab Then
e.Handled = True
End If
End Sub
Protected Overloads Overrides Function ProcessCmdKey(ByRef msg As Message, ByVal keyData As Keys) As Boolean
If TypeOf ActiveControl Is System.Windows.Forms.DataGridViewTextBoxEditingControl Then
If keyData = Keys.Enter Then
.
.'这里面写需要的事件
Return True
End If
End If
End Function
Protected Overloads Overrides Function ProcessCmdKey(ByRef msg As Message, ByVal keyData As Keys) As Boolean
If TypeOf ActiveControl Is System.Windows.Forms.DataGridViewTextBoxEditingControl Then
If keyData = Keys.Enter Then
.
.'这里面写需要的事件
.
End If
End If