title: datagridview get row value error "Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index"
body: <p>I just have this code that would get the value of the specific row in a datagridview. During the execution an exception message have been pop out. "Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index".</p>
  
  <p>Here is my sample code.</p>
  
  <pre><code>for (int i = 0; i &lt; invoiceGridView.Columns.Count; i++)
          {
              MessageBox.Show(invoiceGridView[3, i].Value.ToString());
          }
  </code></pre>