Dim fdr As DataRow = e.DataRow.GetParentRow("表A")If fdr IsNot Nothing AndAlso fdr("X") = True Then If e.DataRow("A") = fdr("A") AndAlso e.DataRow("B") = fdr("B") Then e.DataRow.Delete End IfEnd If
老师:上面这段代码,如果表A逻辑列打勾后不小心在表B中增加行时,就会删除表B中原来的行