Displaying all items in a ListView

G

Guest

Hi, I have found a lot of information about adding items (and sub items) to a listview and that is fine. What I need to be able to do is retrieve the information (items and sub items) back (say in a messagebox) - I can't seem to work out how to do this however. Would anyone be able to point in in the right direction here

//

For intCounter As Integer = 0 To ListView1.Items.Count -
MsgBox(ListView1.Items.Item(intCounter).ToString
Nex

//

That is the nearest I have so far, but the item I want displaying is actually '10000001' but the message box prints 'ListViewItem: {10000001}

Any pointers or advice would be much appreciated - thanks, Synthanator
 
H

Herfried K. Wagner [MVP]

* "=?Utf-8?B?U3ludGhhbmF0b3I=?= said:
MsgBox(ListView1.Items.Item(intCounter).ToString)

That is the nearest I have so far, but the item I want displaying is actually '10000001' but the message box prints 'ListViewItem: {10000001}'

Replace the 'ToString' with 'Text'.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top