'自动复制行,如果列名不同,或者只需复制部分列,代码如下:
If e.DataCol.Name = "复制" AndAlso e.DataRow("复制") = True Then
Dim nma() As String = {"序号","产品编号","数量","单位","单价"} 'A表数据来源列
Dim nmb() As String = {"序号","产品编号","数量","单位","单价"} 'B表数据接收列
Dim dr As DataRow = DataTables("订单明细表").AddNew
For i As Integer = 0 To nma.Length - 1
dr(nmb(i)) = e.DataRow(nma(i))
Next
End If
点选复制后出现错误!
.NET Framework 版本:2.0.50727.3649
Foxtable 版本:2013.10.14.1
错误所在事件:表,订单明细表,DataColChanged
详细错误信息:
Exception has been thrown by the target of an invocation.
Column ' 订单编号' does not belong to table 订单明细表.