title: [C# DataGridView]How to make the datagridview receive the keydown event, not the cell control, after the cell edit
body: <p>I have a KeyDown event in which in DataGridView, when pressed enter key, selection moves to next column and not the next row.
  The code I have written only works when the cells are not in edit mode.
  When the cells are cell end edit, selection moves to next row same column.
  Can someone explains me?</p>
  <pre><code>private void dataGridView_voucherdetail_KeyDown(object sender, KeyEventArgs e)
      {
          e.SuppressKeyPress = true;
          if (e.KeyData == Keys.Enter)
          {
              int iCol = dataGridView_voucherdetail.CurrentCell.ColumnIndex;
              int iRow = dataGridView_voucherdetail.CurrentCell.RowIndex;
  
              if (iCol &lt; dataGridView_voucherdetail.Columns.Count - 1)
              {
                  iCol = iCol + 1;
              }
              else if (iCol == dataGridView_voucherdetail.Columns.Count - 1 &amp;&amp; iRow &lt; dataGridView_voucherdetail.Rows.Count - 1)
              {
                  iCol = 0;
                  iRow = iRow + 1;
              }
  
              dataGridView_voucherdetail.CurrentCell = dataGridView_voucherdetail[iCol, iRow];
          }
      }
  </code></pre>