In vb.net datagridview the default Enter/Return key behavior is to move to the next row is there a quick and easy way to avoid that.
Any suggestions are welcome
You can try something like this in the gridview key down event
Private Sub DataGridView1_Keydown (...) Handlers DataGridView1.KeyDown If e.KeyCode = Keys.Enter Then ' Your code here e.SuppressKeyPress = True End If End Sub
Another option would be to create a custom grid view control
DataGridView.ProcessDataGridViewKey Method
1.4m articles
1.4m replys
5 comments
57.0k users