从ListView删除选定的项目 [英] Remove the Selected Item From ListView
本文介绍了从ListView删除选定的项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何从列表视图中删除所选项目?
How can I remove a selected item from a listview?
推荐答案
foreach ( ListViewItem eachItem in listView1.SelectedItems)
{
listView1.Items.Remove(eachItem);
}
其中listView1是您的列表视图的ID.
where listView1 is the id of your listview.
这篇关于从ListView删除选定的项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文