合在一起什么意思? 这样?
If e.Col.Name = "项目" Then If e.Row.IsNull("类别") Then e.Col.Combolist = "" Else '否则 Dim drs As New List(Of DataRow) Dim Val AS String drs = DataTables("价表").Select("[类别] = '" & e.Row("类别") & "'") For Each dr As DataRow In drs Val = Val & "|" & dr("项目") Next e.Col.Combolist = Val End If ElseIf e.Col.Name = "规格" Then If e.Row.IsNull("类别") OrElse e.Row.IsNull("项目") Then e.Col.Combolist = "" Else '否则 Dim drs As New List(Of DataRow) Dim Val AS String drs = DataTables("价表").Select("[类别] = '" & e.Row("类别") & "'" & " and [项目]='" & e.Row("项目") & "'") For Each dr As DataRow In drs Val = Val & "|" & dr("规格") Next e.Col.Combolist = Val End If End If
|