title: adding new row in buttom of datagrid by editing cell one by one
body: <p>try to add new row at my datagrid "sgv1" , the content of the datagrid is bound to table "TOR" .. problem is when i try to put value to first cell and leave it , i get nullexception reference because of the other cells. 
  well that's right ,so how to deal with other cells .. how to pervent checking other cells untill i come to it and give it the value .. or any another solutions , any suggutions guys.. </p>
  
  <p>i have tried with event CellValidating to check cells , as mentioned above i get null refernece .. </p>
  
  <pre><code>private void Sgv1_CellValidating(object sender,DataGridViewCellValidatingEventArgs e)
     {         
          try
               { 
                      DialogResult result;
  
                      switch (currentTable)
                      {
                          // name of table 
                          case "TOR":
  
                              if (sgv1.Rows[e.RowIndex].Cells[1].Value== null)
                              {
                                  result = MessageBox.Show("feld is empty , please enter a value", "error", MessageBoxButtons.OKCancel, MessageBoxIcon.Error);
  
                                  if (result == DialogResult.OK)
                                  {                      
                                      e.Cancel = false;
  
                                  }
  
                              }
                              if (sgv1.Rows[e.RowIndex].Cells[2].FormattedValue == null)
                              {
                                  result = MessageBox.Show("feld is empty , please enter a value", "error", MessageBoxButtons.OKCancel, MessageBoxIcon.Error);
                                  if (result == DialogResult.OK)
                                  {
                                      e.Cancel = false;
  
                                  }
                              }
                              else {
                                     return;
                                   }
  
                                        break;
                          // antoher table
                          case "Puffer":
                              //  check it's Cells
                              break;
  
                          default: break;
                      }
                  }
  </code></pre>