At the moment i was able to come up with this. This code can generate single rows when you hit the Enter key.
Try this :
vb Code:
Private Sub dg_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles dg.KeyDown If e.KeyCode = Keys.Enter Then addRow() e.Handled = True End If End Sub




Reply With Quote