0

Can anyone explain how to remove an item from a listvuew.

Ive tried:

ListView6.SelectedItems.Remove()

However that doesn't work, it has the little blue line underneath it. Does anyone else have any ideas?

Thanks

3
Contributors
3
Replies
6
Views
4 Years
Discussion Span
Last Post by bnitishpai
1

Try this instead:

For remove use the following:

listview6.Items.Remove(listview6.SelectedItems.Item(0))

'If multiple items are selcted use

For each itm as ListViewItem in ListView6.SelectedItems
    listview6.Items.Remove(itm)
Next
0

Awsome thanks so much thats the first thing thats actually worked on here! Thanks!!!

Please see my other topics, again about listview ie how to open up a form by pressing the item and whe it opens all the data that was saved earlier is in the form where it was when i added it, if that makes sense

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.