Form_Load:- Me.gcMultiRow1.ShortcutKeyManager.Unregister(Keys.F2)
- Me.gcMultiRow1.ShortcutKeyManager.Unregister(Keys.Space)
- Me.gcMultiRow1.ShortcutKeyManager.Register(New SelectAllBeginEdit, Keys.F2)
- Me.gcMultiRow1.ShortcutKeyManager.Register(EditingActions.BeginEdit, Keys.Space)
复制代码 写一个自定义Action- Public Class SelectAllBeginEdit
- Inherits Action
- ' Methods
- Public Overrides Function CanExecute(ByVal target As GcMultiRow) As Boolean
- Return EditingActions.BeginEdit.CanExecute(target)
- End Function
- Protected Overrides Sub OnExecute(ByVal target As GcMultiRow)
- target.BeginEdit(True)
- End Sub
- End Class
复制代码 |