还不如重新生成
Select Case e.DataCol.Name
Case "客户名称","商品名称","规格"
Dim str As String
Dim ary1() As String = {"客户名称","商品名称","规格"}
dim ary2() as string = {"@","#","$"}
For i As Integer = 0 To ary1.Length -1
If e.DataRow.IsNull(ary1(i)) = False Then
str = str & GetPY(e.DataRow(ary1(i)),True) & "|"
Else
str = str & ary2(i) & "|"
End If
Next
msgbox(str.trim("|"))
End Select