title: Load data to a listview control from SQL Server
body: <p>I am trying to retrieve data from SQL Server into my form. I am trying with the below code. When I  run this I get the first item or row but I am unable load the rest of the items into my listview . Can someone help to solve my issue?</p>
  
  <pre><code>Sub GetInvoiceDetails()
      Dim Inv As New petClass
      Dim dt As DataTable = Inv.GetInvoiceDetailsbyNo(txtInvoiceNo.Text)
      If dt.Rows.Count &gt; 0 Then
          For Each row In dt.Rows
              srno += 1
              Dim lstitem = Lstview.Items.Add(srno)
              lstitem.SubItems.Add(dt.Rows(0).Item("ItemName").ToString)
              lstitem.SubItems.Add(dt.Rows(0).Item("SellingPrice".ToString)).ToString()
          Next
      End If
      'clearcontrols
  End Sub
  </code></pre>