title: why datagridview's row leave or cell leave event not allowing addnewrow()
body: <p>I have a windows form in which i have one txtbox, one datagridview and one button for save .</p>
  
  <p>now as value is entered in textbox, related values will be filled in datagridview ( i am manually calling <code>datagridview.addnewrow()</code> as <code>dgv.allowadd = false</code> for my application )</p>
  
  <p>now i want that instead of focus going to save button I want the focus on textbox again ! so as to enter other value and on datagridview one more row will be added from <code>dgv.addnewrow()</code></p>
  
  <p>as i set the focus manually on textbox with <code>dgv.rowLeave</code> Event or <code>dgv.cellLeave</code> event <code>&gt; dgv.addnewrow()</code> is not working for the 2nd time <code>addnewrow()</code> . It is overwritting the 1st added row </p>
  
  <p><code>addnewrow()</code> works fine all time as i enter value in textbox if i writes the code in <code>dgv.leave</code> Event </p>
  
  <p>so if anyone can Help me to achieve this functionality! </p>
  
  <pre><code>    private void TxtPACKET_NO_KeyDown(object sender, KeyEventArgs e)
      {
         // on key enter fetch the packet information 
         if (e.KeyCode == Keys.Enter)
         {
           if (txtBARCODE.Text.Length &gt; 0)
             {
               FetchData(txtBARCODE.Text);
             }
         }
      }
     private void FetchData(string PacketNo)
     {
        DataRowView drv = dgvGRADE_DET_PS.AddNewRow();
        drv.BeginEdit();
        // Assigning Necessary Values to the columns
       drv.EndEdit();
       this.dgvGRADE_DET_PS.CurrentCell = this.dgvGRADE_DET_PS.Rows[this.dgvGRADE_DET_PS.Rows.Count - 1].Cells[3];
     }
  
      void dgvGRADE_DET_PS_CellLeave(object sender, DataGridCellEventArgs e)
      {
          if (this.dgvGRADE_DET_PS.Columns[e.ColumnIndex].Name == "MY COLUMN NAME")
          {
              this.txtBARCODE.Text = string.Empty;
              this.txtBARCODE.Select();
          }
      }
  </code></pre>