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

Recommended Answers

All 3 Replies

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

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

Please mark it as 'Solved' if your problem is solved. Best regards

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.