public bool _last; private void SupperDataGridView_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Enter) { e.SuppressKeyPress = true; int iColumn = this.CurrentCell.ColumnIndex; int iRow = this.CurrentCell.RowIndex; if (iColumn == this.Columns.Count - 1) { if (iRow < this.Rows.Count - 1) { this.CurrentCell = this [0, iRow + 1]; } else { _last = true; } } else { this.CurrentCell = this[iColumn +1,iRow]; } } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)