Results 1 to 7 of 7

Thread: DatagridView KeyUp add New Row Problem

Threaded View

  1. #7
    Hyperactive Member Ram2Curious's Avatar
    Join Date
    Apr 2010
    Posts
    484

    Re: DatagridView KeyUp add New Row Problem

    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:
    1. Private Sub dg_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles dg.KeyDown
    2.  
    3.         If e.KeyCode = Keys.Enter Then
    4.  
    5.             addRow()
    6.  
    7.             e.Handled = True
    8.  
    9.         End If
    10.  
    11. End Sub
    Last edited by Ram2Curious; Apr 4th, 2011 at 06:40 AM. Reason: Code Correction.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width