楼主:需要在表B 中加入一列"id"
If e.DataCol.Name = "逻辑列名" Then
If e.DataRow("逻辑列名") = True Then
Dim dr As DataRow = DataTables("表B").AddNew
For Each dc As DataCol In DataTables("表B").DataCols
If dc.name ="id" Then
dr("id") =e.DataRow("_identify")
Else
dr(dc.Name) = e.DataRow(dc.Name)
End If
Next
Else
Dim tr As DataRow =DataTables("表B").find("id ="& e.DataRow("_identify"))
If tr IsNot Nothing Then
tr.delete()
End If
End If
End If