Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27348

VS 2012 Populating listview with a 1 dimensional array using split method

$
0
0
Hello, this is my first post! I would like to ask help with this one, i am creating a server/client program using tcp/ip! I need to put the data received in my listview, but all i can do is to show it only with a messagebox...... here is my code:


Private Sub MessageReceived(ByVal message As String)
Dim data() As String = message.Split("|")
Case "/saved"
With ListView1
.Items.Clear()
.BeginUpdate()
.Refresh()
End With
Dim i As Integer
For i = 1 To data.Count - 1
'MsgBox(data(i)) -tried to show the data sent, and it is successful, but when i put to the listview it won't
With ListView1
.Items.Add(data(i))
With .Items(.Items.Count - 1).SubItems
.Add(data(i))
.Add(data(i))
.Add(data(i))
End With
End With
Next
With ListView1
.Items.Clear()
.EndUpdate()
.Refresh()
End With
End Select


...... :) anyone plz?

Viewing all articles
Browse latest Browse all 27348

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>