CSDN博客

img foart

C# 用ListView控件多个选中并进行删除

发表于2008/10/2 21:07:00  2641人阅读

private void button1_Click(object sender, EventArgs e)
        {
            listView2.MultiSelect = true;
            foreach (ListViewItem var in listView2.Items)
            {
                if (var.Selected)
                {
                    var.Remove();
                }
            }
        }

0 0

相关博文

我的热门文章

img
取 消
img