Check all item in listview with huge list item?

前端 未结 6 860
情书的邮戳
情书的邮戳 2021-01-25 06:19

I want to check about 3000 item in listview. This is a bit of code :

foreach (ListViewItem item in this.lvItem.Items)
{
    item.Checked = !item.Ch         


        
6条回答
  •  悲哀的现实
    2021-01-25 07:05

    for (int i = 0; i <= listView1.Items.Count - 1; i++)
    {
         if (!listView1.Items[i].Checked)
         listView1.Items[i].Checked = true;
    }
    

提交回复
热议问题