title: Why is DataGridView SelectionChanged event not firing?
body: <p>In the code below, the <code>datagridview1_SelectionChanged</code> event which fires after the selection has been changed through the code in <code>datagridview1_RowsAdded</code> event handler, the <code>CurrentRow</code> property is null. but I have just set it in <code>datagridview1_RowsAdded</code>  handler and it is not null in there.</p>
  
  <p>However, if I comment the two lines in <code>datagridview1_RowsAdded</code> handler and select the row through mouse click on any row, the program works fine. Can anyone tell me why this is happening?</p>
  
  <p>Here’s my code:</p>
  
  <pre><code>private void dataGridView1_RowsAdded(object sender, DataGridViewRowsAddedEventArgs e)
  {
      dataGridView1.CurrentCell = dataGridView1.Rows[dataGridView1.Rows.Count - 1].Cells[1];
      dataGridView1.CurrentCell.Selected = true;
  }
  
  private void dataGridView1_SelectionChanged(object sender, EventArgs e)
  {
      if (dataGridView1.CurrentRow != null)
      {
          if (dataGridView1.CurrentRow.Index != -1)
          {
             dataGridView2.Enabled = true;
             dataGridView3.Enabled = true;
             dataGridView4.Enabled = true;
          }
          else
          {
             dataGridView2.Enabled = false;
             dataGridView3.Enabled = false;
             dataGridView4.Enabled = false;
          }
      }
      else
      {
          dataGridView2.Enabled = false;
          dataGridView3.Enabled = false;
          dataGridView4.Enabled = false;
      }
  }
  </code></pre>