回复 2楼Alice的帖子
在ProcessCmdKey中将Up和Down吃掉是可以的,但这不是什么好方法…………
Protected Overrides Function ProcessCmdKey(ByRef msg As Message, keyData As Keys) As Boolean
If Me.ActiveControl IsNot Nothing AndAlso TypeOf Me.ActiveControl Is GrapeCity.Win.MultiRow.InputMan.GcNumberEditingControl Then
If keyData = Keys.Up Then
If GrapeCity.Win.MultiRow.SelectionActions.MoveUp.CanExecute(Me.dpvLine) Then
GrapeCity.Win.MultiRow.SelectionActions.MoveUp.Execute(Me.dpvLine)
End If
Return True
ElseIf keyData = Keys.Down Then
If GrapeCity.Win.MultiRow.SelectionActions.MoveDown.CanExecute(Me.dpvLine) Then
GrapeCity.Win.MultiRow.SelectionActions.MoveDown.Execute(Me.dpvLine)
End If
Return True
Else
Return MyBase.ProcessCmdKey(msg, keyData)
End If
Else
Return MyBase.ProcessCmdKey(msg, keyData)
End If
End Function |