By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,640 Members | 1,363 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,640 IT Pros & Developers. It's quick & easy.

Use of 'Enter' in DataGrid?

P: n/a
Hi, hope anyone can help me with this!

I want the Enter button to let me move to the next row but in the same
column sorta like in MS Excel

Any ideas?

best regards
/Lars
Nov 20 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
That actually did work... thanx!

Do I need to keep it working in the whole Windows Form or can I use
SendKeys.Send("{DOWN}") anywhere in the program? Like, I only what this to
happens in the grids!

/Lars
"BrianDH" <Br*****@discussions.microsoft.com> skrev i meddelandet
news:62**********************************@microsof t.com...
Try this:

Protected Overrides Function ProcessCmdKey(ByRef msg As System.Windows.Forms.Message, ByVal keyData As System.Windows.Forms.Keys)
As Boolean Select Case msg.WParam.ToInt32()
Case 13 ' enter Key
SendKeys.Send("{DOWN}")
Return True
End Select
Return MyBase.ProcessCmdKey(msg, keyData)

B

"Lars Netzel" wrote:
Hi, hope anyone can help me with this!

I want the Enter button to let me move to the next row but in the same
column sorta like in MS Excel

Any ideas?

best regards
/Lars

Nov 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.