Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Dim category As New List(Of String)
- Dim products As New List(Of String)
- 'concantenate category
- For i As Integer = 0 To Me.dgvData.Rows.Count - 1
- If dgvData.Rows(i).Cells("chk").Value = True Then
- category.Add(dgvData.Rows(i).Cells("catName").Value)
- End If
- Next
- Dim combinedCategory As String = String.Join(", ", category)
- 'concantenate products
- For i As Integer = 0 To Me.dgvData.Rows.Count - 1
- If dgvData.Rows(i).Cells("chk").Value = True Then
- products.Add(dgvData.Rows(i).Cells("ProdName").Value)
- End If
- Next
- Dim combinedProducts As String = String.Join(", ", products)
- descriptive = combinedCategory & ", " & combinedProducts
Add Comment
Please, Sign In to add comment