如果使用下段代码,如何修改可以实现:
If e.DataCol.Name = "产品规格1"
e.DataRow("外径") = Nothing
e.DataRow("内径") = Nothing
e.DataRow("高度") = Nothing
If e.DataRow.IsNull(e.DataCol.Name) = False Then
Dim Str As String = e.NewValue
Dim arr() As String = str.Split(new Char(){"/","×"})
e.DataRow("外径") = arr(0)
If arr.Length >= 3 Then
e.DataRow("内径") = arr(1)
e.DataRow("高度") = arr(2)
Else
If str.Contains("/") Then
e.DataRow("内径") = arr(1)
ElseIf str.Contains("×") Then
e.DataRow("高度") = arr(1)
End If
End If
End If
End If