If e.DataCol.Name = "逻辑列名" AndAlso e.DataRow("逻辑列名") = True Then
Dim nma() As String = {"A1","A2","A3","A4"} 'A表数据来源列
Dim nmb() As String = {"B1","B2","B3","B4"} 'B表数据接收列
Dim nmc() As String = {"B1","B2","B3","B4"} 'B表数据接收列
Dim dr As DataRow = DataTables("表B").AddNew
Dim cr As DataRow = DataTables("表C").AddNew
For i As Integer = 0 To nma.Length - 1
dr(nmb(i)) = e.DataRow(nma(i))
cr(nmc(i)) = e.DataRow(nma(i))
Next
End If
这样试试
|