Keyup, KeyDown, and KeyPress events for a datagrid do not work. URGENT !!!!

Discussion in 'ASP .Net Datagrid Control' started by Chris Calhoun, Oct 10, 2003.

  1. Here are the three event handlers I am trying to catch the key events, but
    they do not work.
    private void dgResults_KeyDown(object sender,
    System.Windows.Forms.KeyEventArgs e) {
    MessageBox.Show("Key Down!");
    private void dgResults_KeyPress(object sender,
    System.Windows.Forms.KeyPressEventArgs e) {
    MessageBox.Show("Key Pressed!");
    private void dgResults_KeyUp(object sender,
    System.Windows.Forms.KeyEventArgs e) {
    MessageBox.Show("Key Up!");
    Chris Calhoun, Oct 10, 2003
    1. Advertisements

  2. Chris,

    In an HTTP application, you are in a stateless environment. Therefore,
    when the user of your application hits a key on their keyboard, there is no
    way for the application running on the Web server to know this.

    If you want to capture keyboard events, you will need to write client-side

    Jim Cheshire [MSFT]
    Developer Support

    This post is provided as-is with no warranties and confers no rights.

    Jim Cheshire [MSFT], Oct 10, 2003
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.