你能帮我解决这个..
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
我需要用标签的值替换单元格的值。但是我的代码仍然不起作用。