Valhalla Legends Forums Archive | Visual Basic Programming | List View Remove

AuthorMessageTime
Imperceptus
When I need to remove something from the listview on an event I am unable to.

I have tried
[code]
frmMain.ListView1.ListItems.Remove frmMain.ListView1.FindItem(ItemThatIwantToRemove).Index
[/code]

My Problem is that I have more then 2 columns on the listview. It seems that I need to Direct FindItem to look in the SubItems of the Listview but i dont know how to.
Am I making any sense, or do I need to explain more, Any help would be appreciated.

I have looked across and searched for the answer to this on the forum.
February 3, 2004, 10:16 PM
Lobo.id
[code]lstUsers.ListItems.Remove lstUsers.FindItem(ItemThatIwantToRemove).SubItems(Columns index)[/code]

Maybe? I don't know just trying to help. Someone else thats better should be able to help you if this was not helpful.
February 5, 2004, 12:48 AM
MesiaH
Are you trying to remove an item based on its subitem value(s)?
February 5, 2004, 4:16 AM
synth
If I'm not mistaken, he has to find the index number of the listitem name he wants to remove. ListItems.Remove requires an index number, and doesn't accept a string.
February 9, 2004, 3:17 PM
Grok
[code]
frmMain.ListView1.ListItems.Remove frmMain.ListView1.FindItem(StringToFind, lvwSubItem, , lvwWholeWord).Index
[/code]
February 9, 2004, 5:35 PM

Search