If e.DataCol.name = "A" OrElse e.DataCol.name = "B" Then Dim fdr As DataRow = DataTables("表a").find("A = '" & e.DataRow("A") & "'") If fdr IsNot Nothing AndAlso fdr("B") = e.DataRow("B") Then e.DataRow("c") = "正确" Else e.DataRow("c") = "错误" End If End If