title: How to find maximum value in DataGridView?
body: <p>I load data that has positive and negative values like 0.0012, -0.00034 and so on. How I want to find max values from the data? i refer this website but error <a href="https://1bestcsharp.blogspot.com/2016/04/csharp-datagridview-maximum-column-value.html" rel="nofollow noreferrer">link</a></p>
  <pre><code> double max = 0;
          for (int i = 1; i &lt;= dataGridView1.Rows.Count - 1; i++)
          {
              if (max &lt; double.Parse(dataGridView1.Rows[i].Cells[1].Value.ToString()))
              {
                  max = double.Parse(dataGridView1.Rows[i].Cells[1].Value.ToString());
              }
          }
  
          textBoxMax.Text = max.ToString();
  </code></pre>
  <p><a href="https://i.stack.imgur.com/QYwl3.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/QYwl3.jpg" alt="This is the error" /></a>
  <a href="https://i.stack.imgur.com/EiPQ2.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/EiPQ2.jpg" alt="enter image description here" /></a></p>
  <p>What should i change in my code to get the max. value? I want to display them in the textBox.</p>