Hi everyone!
I'm trying to use listview control in vb.net or vb2008 express edition to display records from my database after it is being queried.I have two column headers in my listview control which are named Account# and Authorized Users. I was able to display the records from the database into the listview control but i don't know how to arrange it in a proper column where it should be displayed cause what happen is all records are being combined in one column which other records should be aligned to the other column.What I want is to display the account numbers in aligned with the Account# column header and the names should be aligned in Authorized Users column header. Here's the codes I used:
*****************************************************************
Private Sub Button1_Click(-------------) Handles Button1.Click
Dim db As New memrecDataContext
Dim au = From ah In db.Table1s _
Where ah.Account <> " "
For Each ah In au
With Form9.ListView1.Items
Form9.ListView1.Items.Add(ah.Account)
Form9.ListView1.Items.Add(ah.Name)
Form9.Show()
End With
Next
End Sub
*********************************************************
I would greatly appreciate if you could correctly debug the codes for me?