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
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