Results 1 to 2 of 2

Thread: Datagrid up/down/left/right key event

  1. #1

    Thread Starter
    New Member
    Join Date
    Nov 2006
    Posts
    7

    Post Datagrid up/down/left/right key event

    Hello All,
    I want to stop the default event for the key up/down/left/right.
    Means when i am working on a grid and press down key it creates new row in datagrid I want to stop this event is there any property for do this or code?

    Please help me

    Thanks

  2. #2
    PowerPoster RhinoBull's Avatar
    Join Date
    Mar 2004
    Location
    New Amsterdam
    Posts
    24,132

    Re: Datagrid up/down/left/right key event

    It's unclear which datagrid you're using so if it DataGridView control (VB 2005 / 2008) then it has AllowUserToAddRows property so set to False via code or Properties window.
    Code:
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        DataGridView1.AllowUserToAddRows = False
    End Sub

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