ListView
How to Remove Item from Dynamically growing ListView Collections with just name known..
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegister
VulpesRank #55 · 29.2K reputationPosted Jun 24, 2011, 5:10 AM EDT
http://msdn.microsoft.com/en-us/library/system.windows.forms.listview.listviewitemcollection.removebykey.aspx
seenu B35 reputationPosted Jun 27, 2011, 9:59 PM EDT
for (int i = 0; i < listBox2.SelectedItems.Count; i++)
{
listBox2.Items.Remove(listBox2.SelectedItems[i].ToString());
}