removing an item from a listview control

T

Tim

I have a listview control in my app and what I'm trying to do is this: I
have FullRowSelect set to True and in my listview control I want to be able
to select a full row and remove it from the listview. This seemed easy for
me to do but as I found out it wasn't as easy. Is there a way to get the
index of the full row that I select?

Thanks,
Tim
 
H

Herfried K. Wagner [MVP]

* "Tim said:
I have a listview control in my app and what I'm trying to do is this: I
have FullRowSelect set to True and in my listview control I want to be able
to select a full row and remove it from the listview. This seemed easy for
me to do but as I found out it wasn't as easy. Is there a way to get the
index of the full row that I select?

\\\
Dim li As ListViewItem
For Each li In Me.ListView1.SelectedItems
li.Remove()
Next li
///
 

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

Top