private void dataGridView1_KeyDown(object sender, KeyEventArgs e) //按下回车执行tab { if (this.dataGridView1.Focused && e.KeyCode == Keys.Enter) { SendKeys.Send("{Up}"); SendKeys.Send("{Tab}"); } }