参考这个,自己改改。5.30 How can I prevent the Enter key from moving to the next cell when the user is actively editing the cell and presses Enter?
http://www.syncfusion.com/FAQ/WinForms/FAQ_c44c.asp#q791q

解决方案 »

  1.   

    to:theares   你给的连接打不开呀。请给我详细的方法,好吗?
      

  2.   

    能打开啊
    具体代码如下:
    protected override bool ProcessKeyPreview(ref System.Windows.Forms.Message m) 
     

     
         Keys keyCode = (Keys)(int)m.WParam & Keys.KeyCode; 
     
         if((m.Msg == WM_KEYDOWN || m.Msg == WM_KEYUP) 
     
              && keyCode == Keys.Enter ) 
     
              return false; 
     
         return true; 
     
    }