deepPowdah
New member
- Joined
- Mar 28, 2008
- Messages
- 1
- Programming Experience
- 10+
I would like to suppress carriage returns entered in a row in a DataGridView and replace it with a tab. This would prevent users from acccidentally moving between rows when entering data.
So far I have been able to suppress the carriage returns but not replace it with a tab. Any ideas about how to do this
Private Sub DataGridView1_KeyDown( ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles DataGridView1.KeyDown
if e.keycode = Keys.Return then
e.SuppressKeyPress = true
End If
End Sub
Thanks for your help
So far I have been able to suppress the carriage returns but not replace it with a tab. Any ideas about how to do this
Private Sub DataGridView1_KeyDown( ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles DataGridView1.KeyDown
if e.keycode = Keys.Return then
e.SuppressKeyPress = true
End If
End Sub
Thanks for your help