1、你流水RMB必须多加一列【外表编号】,用来记录另一个表的编号数据。
2、代码这样写
If e.DataCol.Name = "统计项目" Then
If e.DataRow.isnull("统计项目") Then
e.DataRow("核对") = False
Else
e.DataRow("核对") = True
End If
End If
If e.DataCol.Name = "核对"
If e.DataRow("核对") = True Then
Dim dr As DataRow = DataTables("流水RMB").AddNew
For Each dc As DataCol In e.DataTable.DataCols
dr(dc.Name) = e.DataRow(dc.Name)
Next
dr("外表编号") = e.dataRow("_Identify")
Else
DataTables("流水RMB").deletefor("外表编号 = '" & e.datarow("_Identify") & "'")
End If
End If
[此贴子已经被作者于2017/1/6 16:07:31编辑过]