老师好,当我重置其中商品名称和规格列时下面代码报错
Select Case e.DataCol.Name
Case "客户名称","商品名称","规格"
Dim n1 As Integer
Dim Lms,py,jps As String
Dim jps1 As New List(Of String)
Lms ="客户名称|商品名称|规格"
For Each py In Lms.split("|")
If py =e.DataCol.Name Then
Exit For
End If
n1+=1
Next
If e.DataRow.Isnull(e.DataCol.Name) Then
py ="@|#|$".split("|")(n1)
Else
py = GetPY(e.DataRow(e.DataCol.Name),True)
End If
jps1.AddRange(e.DataRow("简拼").split("|"))
jps1.Insert(n1,py)
jps1.RemoveAt(n1+1)
For Each py In jps1
jps+=py & "|"
Next
e.DataRow("简拼") = jps.trim("|")
End Select
此主题相关图片如下:图像 2.png
