Hi,
There are a few threads to show how to handle the keypress event but I can't find a way to update the datagridview cell with the new contents of the editing textbox control. If I add a character to a the text of a cell I want it to react with the new cell contents. Is this possible?
Code:Private Sub DGV_EditingControlShowing(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewEditingControlShowingEventArgs) Handles DGV.EditingControlShowing If PauseEvents = False Then Dim txtEdit As System.Windows.Forms.TextBox = e.Control 'remove any existing handler RemoveHandler txtEdit.KeyPress, AddressOf txtEdit_Keypress AddHandler txtEdit.KeyPress, AddressOf txtEdit_Keypress End If End Sub Private Sub txtEdit_Keypress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) 'Need to update the datagridview somehow End Sub


Reply With Quote

