以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- 多值字段拆分填充到列 (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=102892) |
-- 作者:有点色 -- 发布时间:2017/6/27 15:25:00 -- If e.DataCol.Name = "抽签入围" Then For Each dc As DataCol In e.DataTable.DataCols If dc.Name.StartsWith("市") Then e.DataRow(dc.name) = Nothing End If Next If e.NewValue <> Nothing Then Dim ary() As String = e.newvalue.split(",") Dim i As Integer = 1 Dim j As Integer = 1 For Each s As String In ary If s.StartsWith("内") Then e.DataRow("市内_" & i & "号") = s.Trim("内") i += 1 ElseIf s.StartsWith("外") Then e.DataRow("市外_" & j & "号") = s.Trim("外") j += 1 End If Next End If End If |