表B的DataColChanged事件
Select Case e.DataCol.name Case "A", "C" Dim pdr As DataRow = DataTables("表A").find("A= '" & e.DataRow("A") & "'") If pdr IsNot Nothing Then If e.DataRow.IsNull("C") = False Then pdr("D") = "出售" Else pdr("D") = Nothing End If End IfEnd Select