title: Object reference not set to an instance of an object. appears when select any row from the gridView
body: <p>I have 2 forms.. <code>gridForm</code> has a <code>dataGridView</code> gets its data from database, the second form <code>editForm</code>has <code>textboxes</code> similar to the <code>gridView Columns</code>.</p>
  
  <p>i want to select a row in the <code>grid</code> then click an edit button and the <code>editForm</code> must shown and the textboxes have the values from grid</p>
  
  <p><strong>gridForm</strong></p>
  
  <pre><code>private void dataGridView1_CellContentClick_1(object sender, DataGridViewCellEventArgs e)
      {
          if (e.RowIndex &gt;= 0)
          {
              DataGridViewRow row = dataGridView1.Rows[e.RowIndex];
  
              // when i put this line only , it works right.
              edditContactForm.edditContactNameSetter = row.Cells["contactNameGridViewColumn"].Value.ToString();
  
              // this also with the previous is working right too.
              edditContactForm.edditJobTitleSetter = row.Cells["jobTitleGridViewColumn"].Value.ToString();
  
              // the problem appears here and the exhibition shown to this line and any similar lines under it. 
              edditContactForm.edditCompanyNameSetter = row.Cells["CompanyNameGridViewColumn"].Value.ToString();
          }
      }
  </code></pre>
  
  <p><strong>editForm:</strong></p>
  
  <pre><code>    public string edditContactNameSetter 
      {
          set { txtContactName.Text = value; }
      }
  
      public string edditJobTitleSetter
      {
          set { txtJobTitle.Text = value; }
      }
  
      public string edditCompanyNameSetter
      {
          set { txtCompanyName.Text = value; }
      }
  </code></pre>
  
  <p><strong>exhibition:</strong></p>
  
  <p>The exhibition appers when i select any row from the grid
  <img src="https://i.stack.imgur.com/6nqqe.png" alt="enter image description here"></p>