Help! Number Pad Negative key not working in DataGrid ...

Hello..
When using a Windows Forms DataGrid, the Negative key (-) does not register when pressed.
All the numbers on the pad work fine "0-9", including the "/" and "*" keys.

Am I missing something here 

Also, the Negative Key along the top of the keyboard DOES work however.

Thanks in advance - B


Answer this question

Help! Number Pad Negative key not working in DataGrid ...

  • Jordan Zhang

    A Sample - run this and try to use the NumberPad "Negative key"


    private void Form1_Load(object sender, System.EventArgs e)
    {
    System.Data.DataTable DT = new System.Data.DataTable("ATable");
    DT.Columns.Add("ACol");
    System.Data.DataRow DR = DT.NewRow();
    DR["ACol"] = "A";
    DT.Rows.Add(DR);
    dataGrid1.DataSource = DT;
    }

  • Ravindra N

    This is a known issue that was fixed in Vs.Net 2003.
  • YasserAli

    Thanks-
    However - I do not yet have VS 2003 and am trying to capture keypress events to fix the error myself - but to no avail - the Negative key simply doesn't register.

    BTW - where did you get information regarding the bug fix 

       - B

  • Help! Number Pad Negative key not working in DataGrid ...