title: Data Grid View Replace Value
body: <p>Can you help me with this..</p>
  
  <pre><code>   For Each r As DataGridViewRow In dglist.Rows
          For Each c As DataGridViewCell In r.Cells
              If c.Value IsNot Nothing Then
                  **If c.Value.ToString = Label2.Text.ToString Then
                      c.Value.ToString.Trim.Replace(c.Value.ToString.Trim, TextBox1.Text)
                  End If**
  
                  'MessageBox.Show(c.Value.ToString)
              End If
          Next
      Next
  </code></pre>
  
  <p>I need to replace the value of the cell with the value of the label.
  But still my code did not work.</p>