beforesavedatarow事件
If e.DataRow("第五列") = False Then
Dim arr() As String = {"第一列","第二列","第三列","第四列"}
Dim s1 As String = ""
Dim s2 As String = ""
For Each cl As String In arr
s1 = s1 & cl & "+'|'+"
s2 = s2 & e.DataRow(cl) & "|"
Next
Dim filter As String = s1.trim("+") & " = '" & s2 & "' and 第五列 = false"
If e.DataTable.compute("count(_Identify)", filter) > 1 Then
msgbox("重复")
'e.DataRow.Delete
e.cancel = True
End If
End If