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 (...) Handles 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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With