我试图通过datagrid列中的数字列表循环(num1),然后当出现某个数字时(在示例中为10),它将该数字复制到同一个数字中的另一列(num2) datagrid.But当我运行代码我没有得到任何错误但没有任何反应。任何帮助赞赏
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
For Each row As DataGridViewRow In Me.DataGridView1.Rows
If row.Cells("num1").Value = "10 " Then
row.Cells("num2").Value = "10"
End If
Next