老师你好,我要将下列字符串222110\应交税费\车船税\,根据“\"符号拆分,分别填列到对应的列中去,如下列代码,可不行,请老师帮忙,谢谢
If e.DataCol.Name = "科目代码" Then '发生变化的是产品编号吗?
'在产品表找出该产品
Dim dr As DataRow
Dim Multi As String = e.DataRow("科目名称")
Dim Values() As String
Values = Multi.split("\")
For Index As Integer = 0 To 3
dr("一级科目") = Multi.Split(Values(Index(1)))
dr("二级科目") = Values(Index(2))
dr("三级科目") = Values(Index(3))
Next
End If