BeforeAddDateRow事件
Dim parent As DataRow = e.DataRow.GetParentRow("父表")
Dim count As Integer = DataTables("父表").compute("count(_Identify)", "第三列 = '" & parent("第三列") & "' and 第二列 = '" & parent("第二列") & "'and 第四列 = '" & parent("第四列") & "'"))
If count > 1 Then
msgbox("重复了")
e.Cancel = True
End If