Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #13967 |

    Hello –

    I’m trying to implement an event triggered by a shift+control+down event. However, I seem to be unable to capture events that should seemingly be triggered by the down arrow button. My guess is that the gridcontrol is catching those keystrokes and consequently all subsequent events do not catch them. Is there anyway around this functionality, or perhaps I am missing something entirely? Any help would be appreciated.

    Thanks in advance,

    Craig

    Imported from legacy forums. Posted by csperler (had 2405 views)

    User (Old forums)
    Member
    Post count: 23064

    Try something like this:<code>grid.KeyDown += new KeyEventHandler(grid_KeyDown);
    private void grid_KeyDown(object sender, KeyEventArgs e) {
    if (e.Control && e.Shift && !e.Alt) { // Ctrl+Shift
    if (e.KeyCode == Keys.Down) { … }
    else if (e.KeyCode == Keys.Up) { … }
    else if …
    }
    }</code>

    Imported from legacy forums. Posted by Tommy (had 174 views)

    User (Old forums)
    Member
    Post count: 23064

    Awesome. That works perfectly.

    (I had the keydown event on each cell in the grid.)

    Imported from legacy forums. Posted by csperler (had 3551 views)

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.