If e.DataCol.Name = "产品" Then If e.DataRow.IsNull("产品") Then e.DataRow("出货明细") = Nothing Else Dim mx As String Dim drs As List(Of DataRow) drs = DataTables("出货明细").Select("[公司] = '" & e.DataRow("公司") & "'") For Each dr As DataRow In drs mx = mx & dr("出货时间") & " " & dr("出货数量") & vbCrLf Next e.DataRow("出货明细") = "" e.DataRow("出货明细") = mx End If End If