title: datagridview new row indexes
body: <pre><code>|Column 1|Column 2|
  |1       |1       |
  |2       |2       |
  |3       |3       |
  |4       |4       |
  |5       |5       |
  |6       |6       |
  |7       |7       |
  |8       |8       |
  |9       |9       |
  |        |        |
  </code></pre>
  
  <p>Let's say i am displaying this at my datagridview, and now i am adding new row (row 10). I am checking if user left any column empty before i use that data later, and now if user inserted something in column 1, and left column 2 empty i check it and display him message "column 2 can't be empty", but after that i want his selection (currentrow) to be at that empty cell and my problem is that new row does not have index (it has, but when i use it, i got error that i can't use index that is greater than max rows). How can i solve it.</p>
  
  <p>Here is code part where i am checking that</p>
  
  <pre><code>            int nRows = dataGridView1.Rows.Count;
              int currColumn = dataGridView1.CurrentCell.ColumnIndex;
              int currRow = dataGridView1.CurrentCell.RowIndex;
              string id = dataGridView1.Rows[currRow].Cells[0].Value.ToString();
              string opis = dataGridView1.Rows[currRow].Cells[1].Value.ToString();
  
              if (string.IsNullOrEmpty(id))
              {
                  MessageBox.Show("Polje broj ne moze biti prazno!");
                  dataGridView1.CurrentCell = dataGridView1[0, nRows];
              }
              else if (string.IsNullOrEmpty(opis))
              {
                  MessageBox.Show("Polje opis ne moze biti prazno!");
                  dataGridView1.CurrentCell = dataGridView1[1, nRows];
              }
  </code></pre>