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
Will something like this work for you? ...when checked, add the items to a Dictionary ...when unchecked, remove from the Dictionary. Not tested code but wondering if you could do something like this:
Dictionary Dic = listView.Items
.Cast()
.ToDictionary(x => x.Text, x => x.SubItems[0].Checked);
You asked how to better go about it. What I am saying is on your Check Event you will want to add items to your list view. I doubt that a user will actually check all 3000, so change your code to decide how you would want to handle checked items, the example that I have given you uses Lambda expression. If not familiar, then please alter your question to reflect what it is that you actually need and/or want...