教程地址
http://www.foxtable.com/help/topics/2292.htm
其中
……
如果列名不同,或者只需复制部分列,可以参考下面的代码:
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 dr As DataRow = DataTables("表B").AddNew
For i As Integer = 0 To nma.Length - 1
dr(nmb(i)) = e.DataRow(nma(i))
Next
End If
如果我有一列数据列 比如 “数量”
Dim nma() As String = {"A1","A2","A3","A4","数量"}
复制到新的表的时候 我想让他变成负数。怎么弄呢?
[此贴子已经被作者于2012-4-9 17:45:21编辑过]