老师,下面代码报错,我只要复制2列。
If e.DataCol.Name = "群组分类" OrElse e.DataCol.Name = "客户供应商" Then
If e.DataRow.IsNull("群组分类") = False AndAlso e.DataRow.IsNull("客户供应商") = False Then
Dim dr As DataRow = DataTables("qzfl").Find("[群组分类] = \'" & e.DataRow ("群组分类") & "\' And [客户供应商] = \'" & e.DataRow("客户供应商") & "\'")
If dr Is Nothing Then \'如果找到了同名的产品行,也就是dr不是Nothing
dr = DataTables("qzfl").AddNew
End If
For Each dc1 As DataCol In DataTables("通讯录").DataCols
dr(dc1.Name) = e.DataRow(dc1.Name)
Next
End If
End If