change the content of a listview item? How?

J

Jan

Hello everyone,

I've got the following problem. I filled a listview like this:

Counter = 0
Do Until FileIn(Counter) = ""
strItem = FileIn(Counter).Split(";")
ListView1.Items.Add(strItem(0))
ListView1.Items(intLijst).SubItems.Add(strItem(1))
ListView1.Items(intLijst).SubItems.Add(strItem(2))
ListView1.Items(intLijst).SubItems.Add(strItem(3))

Counter += 1
intLijst += 1
Loop
Counter = 0

now i want to select strItem(3) in for example index 10
(i know how to select an listview row with : ListView1.SelectedIndices(0) )
the selected item will be shown in a textbox (i know how, wow!!).
My problem is: I want to change the content of the textbox and put it in
strItem(3). I can not figure it out! Not that experienced with vb.net, but
growing thanks to you guys.

TIA Jan
 
C

Cor Ligthert

Jan,

As long that you don't get a better solution.

Dim lit As New ListViewItem
lit.SubItems.Add(textbox1.text)
ListView1.Items(intLijst).SubItems(3) = lit.SubItems(1)

I hope this helps something,

Cor
 

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

ListView Help 1
System icons in Listview 6
listView - filling it with datareader 3
ListView Control 7
listview question 3
Listview Selected Item 4
Retrieve ListView Checked Items 2
ListView SQL DB Problem 1

Top