Home Forums WinForms controls Xceed Grid for WinForms Numeric Editor Keypress Event Help Reply To: Numeric Editor Keypress Event Help

User (Old forums)
Member
Post count: 23064

Cleaned up the post, should be easier to read. “<code > — </code >” tags are supported if anyone else is wondering. (Remove the spaces though)

<code>Private Sub NumericManager_ActivatingControl(ByVal sender As Object, ByVal e As Xceed.Grid.Editors.CellEditorEventArgs)
Dim t_Editor As Xceed.Editors.WinNumericTextBox = CType(e.Control, Xceed.Editors.WinNumericTextBox)
AddHandler t_Editor.KeyPress, AddressOf Editor_KeyPress
End Sub

Private Sub NumericManager_DeactivatingControl(ByVal sender As Object, ByVal e As Xceed.Grid.Editors.CellEditorEventArgs)
Dim t_Editor As Xceed.Editors.WinNumericTextBox = CType(e.Control, Xceed.Editors.WinNumericTextBox)
RemoveHandler t_Editor.KeyPress, AddressOf Editor_KeyPress
End Sub

Private Sub Editor_KeyPress(ByVal sender As Object, ByVal e As KeyPressEventArgs)
Stop
End Sub </code>Any ideas about what I’m missing?

Imported from legacy forums. Posted by Rock (had 390 views)