waraq
Member
List View Display
I have a problem putting all the text that I read from different text files and then place on the listview. The idea is to read each single file and place it on the corresponding column on the listview that should be like this:
Instead I got this:
This is what I did:
I wil apreciate your help
Willy
I have a problem putting all the text that I read from different text files and then place on the listview. The idea is to read each single file and place it on the corresponding column on the listview that should be like this:
Full Name | Address | Email |
John Smith 123 Washington comcast.net and so on...
Abrahan L 124 WallStreet Google.com
Instead I got this:
Full Name | Address | Email
John Smith Abraham L 123 Washington 124 WallStreet comcast.net and so on
This is what I did:
VB.NET:
Dim NS As StreamReader = File.OpenText(Nombres)
Nomb = NS.ReadToEnd
NS.Close()
Dim LCosa As New ListViewItem
If Nomb <> "" Then
LCosa.Text = Nomb
Else
LCosa.SubItems.Add("Not Entry")
End If
Dim Dia As StreamReader = File.OpenText(Direccion)
Dire = Dia.ReadToEnd
Dia.Close()
If Dire <> "" Then
LCosa.SubItems.Add(Dire)
Else
LCosa.SubItems.Add("Not Entry")
End If
Dim CRO As StreamReader = File.OpenText(Email)
CorreoEle = CRO.ReadToEnd
CRO.Close()
If CorreoEle <> "" Then
LCosa.SubItems.Add(CorreoEle)
Else
LCosa.SubItems.Add("No Entry")
End If
lvData.Items.Add(LCosa)
Willy
Last edited by a moderator: