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
2.1m questions
2.1m answers
60 comments
57.0k users