|
-
Jul 23rd, 2003, 03:09 PM
#1
Thread Starter
Addicted Member
Move cursor in Datagrid Cell
Is there a way where if I hit the Enter key on my keyboard and the cursor or focus is move to the next cell from left to right on the datagrid cell? Currently, if I hit the Enter key, the focus will move from top to bottom and I don't want this. I want to move the focus or cursor from left to right.
Any suggestion is greatly appreciated!
ljCharlie
-
Sep 8th, 2003, 12:11 PM
#2
Member
A bit late, but here is what I do with arrow keys
Private Sub dgName_KeyDown(KeyCode As Integer, Shift As Integer)
'Left Arrow
If KeyCode = 37 And txtArrowFlag = "True" Then
txtArrowFlag = "False"
SendKeys Chr$(13)
SendKeys "{Left}"
End If
'Up Arrow
If KeyCode = 38 And txtArrowFlag = "True" Then
txtArrowFlag = "False"
SendKeys Chr$(13)
SendKeys "{Up}"
End If
'Right Arrow
If KeyCode = 39 And txtArrowFlag = "True" Then
txtArrowFlag = "False"
SendKeys Chr$(13)
SendKeys "{Right}"
End If
'Down Arrow
If KeyCode = 40 And txtArrowFlag = "True" Then
txtArrowFlag = "False"
SendKeys Chr$(13)
SendKeys "{Down}"
End If
End Sub
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|