DataGrid - KeyPress event

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • john sutor

    DataGrid - KeyPress event

    When moving up and down with the arrow keys on my DataGrid, I cannot get
    either the Keypress, KeyUp or KeyDown events to respond. I am putting
    breakpoints in to capture the event but they never get fired. Any input
    will be helpful.

    JOhn


  • Road Warrior

    #2
    Re: DataGrid - KeyPress event

    Ok this may sound a bit unorthodox but if you try it you will be amazed at
    how good the results can be. First obtain a graphic of Michael Jordon that
    shows him about to make a difficult shot. Note the position of his tongue as
    he attempts the shot. Now here is the most important part.....as closely as
    possible mimic this critical tongue position you retry the Keypress, KeyUp
    or KeyDown events.

    I love this game!



    "john sutor" <john_sutor@cin fin.com> wrote in message
    news:%23LxS60mm DHA.3700@TK2MSF TNGP11.phx.gbl. ..[color=blue]
    > When moving up and down with the arrow keys on my DataGrid, I cannot get
    > either the Keypress, KeyUp or KeyDown events to respond. I am putting
    > breakpoints in to capture the event but they never get fired. Any input
    > will be helpful.
    >
    > JOhn
    >
    >[/color]


    Comment

    • Christina Androne

      #3
      Re: DataGrid - KeyPress event

      john sutor wrote:
      [color=blue]
      > When moving up and down with the arrow keys on my DataGrid, I cannot
      > get either the Keypress, KeyUp or KeyDown events to respond. I am
      > putting breakpoints in to capture the event but they never get fired.
      > Any input will be helpful.
      >[/color]

      Does the selected index changed event fire?


      Christina Androne

      Comment

      • Tobin Harris

        #4
        Re: DataGrid - KeyPress event

        "john sutor" <john_sutor@cin fin.com> wrote in message
        news:%23LxS60mm DHA.3700@TK2MSF TNGP11.phx.gbl. ..[color=blue]
        > When moving up and down with the arrow keys on my DataGrid, I cannot get
        > either the Keypress, KeyUp or KeyDown events to respond. I am putting
        > breakpoints in to capture the event but they never get fired. Any input
        > will be helpful.[/color]

        Don't know about key events, but is the CellChanged event firing?

        Tobin
        [color=blue]
        > JOhn
        >
        >[/color]


        Comment

        • David Sabo

          #5
          Re: DataGrid - KeyPress event

          Alright.....try this...
          You should create a method than handle de keydown event. something like
          this

          Private Sub Move_Grid (ByVal sender As System.Object, ByVal e As
          System.Windows. Forms.KeyEventA rgs) Handles DataGrid.KeyDow n

          End Sub

          There you should check if the key pressed is the one you want to react,
          like this:

          If e.KeyCode = Keys.PageDown then or something like this
          [Code for scrolling down]
          End if

          well I hope this helps....

          David Sabo
          Caracas, Venezuela
          "john sutor" <john_sutor@cin fin.com> wrote in message
          news:%23LxS60mm DHA.3700@TK2MSF TNGP11.phx.gbl. ..[color=blue]
          > When moving up and down with the arrow keys on my DataGrid, I cannot get
          > either the Keypress, KeyUp or KeyDown events to respond. I am putting
          > breakpoints in to capture the event but they never get fired. Any input
          > will be helpful.
          >
          > JOhn
          >
          >[/color]


          Comment

          Working...