title: I need to know how to avoid the System.Data.DataRowview in vb 2010
body: <p>I have an issue with my code; and would appreciate some assistance getting her to do what I want without an annoying error. Read the databound listbox strings, find the user selected string and write said string to a file.</p>
  
  <pre><code>    Private Sub btnContinue_Click(sender As System.Object, e
      As System.EventArgs) Handles btnContinue.Click
      '  1st file and mySQL Update to testing table
      If txtLocation.Text.ToString &lt;&gt; "" And txtUnitTested.Text.ToString &lt;&gt; "" Then 
          Dim filewriter As New System.IO.StreamWriter(
                 "C:\Users\OER\Documents\Visual Studio 2010\Projects\frmTest1_0.txt")
          Dim curItem = lstCustomer.SelectedItem
          Dim now As DateTime = DateTime.Now
          With filewriter
              .WriteLine(vbCrLf + (now.ToString("F"))) ' Write the DateTime to the file
          End With
  
          For Each objDataRowView As DataRowView In lstCustomer.SelectedItems
              Dim item As String
              For Each item As DataRowView In Me.lstCustomer.Items.Item("customer")
                  item = String.Parse(lstCustomer.SelectedValue)
                  WriteLine(curItem(item))
              Next item
          Next '  THIS IS THE FOR LOOP I AM HAVING ISSUES WITH!!!!!!!
  
          With filewriter
              .WriteLine(vbCrLf + txtLocation.Text + vbCrLf + txtUnitTested.Text)
          End With
          filewriter.Close()
          frmTest1.Show()
      Else
          MsgBox("Please Type the Location and Unit Tested!!!", vbCritical)
          txtLocation.Clear()
          txtUnitTested.Clear()
          txtLocation.Focus()
      End If
  </code></pre>