Results 1 to 2 of 2

Thread: Move cursor in Datagrid Cell

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Feb 2003
    Posts
    219

    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

  2. #2
    Member
    Join Date
    Aug 2001
    Location
    Ottawa
    Posts
    38

    Talking 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
  •  



Click Here to Expand Forum to Full Width