title: System.ArgumentOutOfRangeException occurred in mscorlib.dll C#
body: <p>I have a DataGridView which I am populating from a list of objects. However my the 2nd loop through my <code>foreach</code> results in an <code>ArgumentOutOfRangeException</code>.</p>
  
  <p>Here is my code:</p>
  
  <pre><code>foreach (Abonat abonat in list.getAbonati())
  {
      dataGridView1.Rows[i].Cells[0].Value = abonat.id; //exception occurs here on second loop
      dataGridView1.Rows[i].Cells[1].Value = abonat.prenume;
      dataGridView1.Rows[i].Cells[2].Value = abonat.nume;
      dataGridView1.Rows[i].Cells[3].Value = abonat.adresa;
      i++;
  }
  </code></pre>
  
  <p>The first time the <code>foreach</code> runs, everything is fine, it even shows up in the DataGridView, but the 2nd time, I get the exception (actually it says <strong>A first chance exception of type 'System.ArgumentOutOfRangeException' occurred in mscorlib.dll</strong>) and my form is shown, without running the rest of the foreach.</p>
  
  <p>Any help on this? I've tried instancing the <code>dataGridView1.Rows[i] = new DataGridViewRow();</code> but it's read-only.</p>