title: Cycling through selected item in listview and populating another listview from subitem that has comma delimited subitem
body: <p>I have a listview called lstProducts. The user selects an item in lstProducts to populate various objects in a form. Three of the subitems are comma delimited strings that must be parsed to populate lstAss.</p>
  <p>I have code that cycles through but it is not parsing correctly:</p>
  <pre><code>Dim input As String = lstProducts.Items(x).SubItems(6).Text
          Dim result As String() = input.Split(New String() {&quot;,&quot;c}, StringSplitOptions.None)
          Dim m As String
          Dim t As String
          For Each s As String In result
              Dim inputT As String = lstProducts.Items(x).SubItems(10).Text
              Dim resultT As String() = inputT.Split(New String() {&quot;,&quot;c}, StringSplitOptions.None)
              Dim inputM As String = lstProducts.Items(x).SubItems(11).Text
              Dim resultM As String() = inputM.Split(New String() {&quot;,&quot;c}, StringSplitOptions.None)
              s = Trim(s)
              For Each t In resultT
                  t = Trim(t)
              Next
  
              For Each m In resultM
                  m = Trim(m)
              Next
              Dim li As New ListViewItem()
  
                  li = lstAss.Items.Add(s, 0)
                  li.SubItems.Add(t)
                  li.SubItems.Add(m)
              Next
  </code></pre>
  <p>To be parsed:</p>
  <p>col6: 1,2,3,4
  col10: a,b,c.d
  col11: 96,97,98,99</p>
  <p>Desired ouput:</p>
  <pre><code>col0
  1
  2
  3
  4
  
  col1
  a
  b
  c
  d
  
  col2
  96
  97
  98
  99
  </code></pre>
  <p>with my code lstAss is currently populating as follows:</p>
  <pre><code>col0
  1
  2
  3
  4
  
  col1
  d
  d
  d
  d
  
  col2
  99
  99
  99
  99
  </code></pre>
  <p>How do I get this to parse correctly? I have tried multiple ways to do this and this is as close as I have gotten.</p>
  <p>The integrity of the data being fed into lstProducts is guaranteed through error handlers. There is a matching subitem in col6, col10, &amp; col11.</p>