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
    1. Advertising

  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
    code.

    Jim Cheshire [MSFT]
    Developer Support
    ASP.NET


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


    --------------------
    >From: "Chris Calhoun" <>
    >Subject: Keyup, KeyDown, and KeyPress events for a datagrid do not work.

    URGENT !!!!
    >Date: Fri, 10 Oct 2003 15:37:39 -0400
    >Lines: 16
    >X-Priority: 3
    >X-MSMail-Priority: Normal
    >X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
    >X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
    >Message-ID: <>
    >Newsgroups: microsoft.public.dotnet.framework.aspnet.datagridcontrol
    >NNTP-Posting-Host: c1.wb1606.lnng.mi.voyager.net 216.93.72.3
    >Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP11.phx.gbl
    >Xref: cpmsftngxa06.phx.gbl

    microsoft.public.dotnet.framework.aspnet.datagridcontrol:6992
    >X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.datagridcontrol
    >
    >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!");
    >}
    >
    >
    >
     
    Jim Cheshire [MSFT], Oct 10, 2003
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. jaspal singh

    trap keypress and keydown event in asp.net mobile form

    jaspal singh, Nov 24, 2006, in forum: ASP .Net Mobile
    Replies:
    1
    Views:
    1,438
  2. Jens Butm

    KeyDown/KeyPress is not working... ??

    Jens Butm, Oct 19, 2007, in forum: ASP .Net Mobile
    Replies:
    0
    Views:
    865
    Jens Butm
    Oct 19, 2007
  3. George Hester

    keyup keydown Netscape > 4.x

    George Hester, Jan 15, 2004, in forum: Javascript
    Replies:
    2
    Views:
    110
    George Hester
    Jan 16, 2004
  4. Andrew DeFaria
    Replies:
    28
    Views:
    410
    Andrew DeFaria
    Jun 9, 2004
  5. Gregor Kofler
    Replies:
    9
    Views:
    340
    Gregor Kofler
    Oct 8, 2009
Loading...

Share This Page