How can I remove a line from the listview using the tag id of the line?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can call the
ListViewItem.Removemethod on theListViewItemyou’re wanting to remove.For example, you could cycle through all of the
ListViewItemsin yourListView, look at theTag, andRemovethe item you want to remove:This example exits after removing the first matching item. If there are multiple matching
ListViewItemsthat need to be removed, you’d need to make a collection of those and then remove them after that.