title: gridview sum of column
body: <p>I want to taking the sum of the numbers in the two columns and write to in textedit. the code does not give an error but it does not do the operating. Where's the problem?</p>
  
  <pre><code>void Numbersum()
      {
          int sumday = 0;
          int sumnight = 0;
          for (int i = 0; i &lt; gridView1.RowCount; i++)
          {
  
              sumday += Convert.ToInt32(gridView1.GetRowCellValue(i, "Day").ToString());
              sumnight += Convert.ToInt32(gridView1.GetRowCellValue(i, "Night").ToString());
          }
          textEdit26.Text = sumday.ToString();
          textEdit27.Text = sumnight.ToString();
      }   
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/9j4qa.jpg" rel="nofollow noreferrer">enter image description here</a></p>
  
  <p><a href="https://i.stack.imgur.com/9j4qa.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/9j4qa.jpg" alt="enter image description here"></a></p>