I am making quarantine and I have listView
for showcase of all viruses, and I added checkbox to listview in Header Column (I don't know if I can add checkbox in header column). I added separate column with checkboxes.
I want that checkbox in header when it's checked that all checkboxes in viewlist items are checked.
I hope somebody can help. Thanks!
Using a Button Click:
private void button1_Click(object sender, EventArgs e)
{
for (int i = 0; i < listView1.Items.Count; i++)
{
listView1.Items[i].Checked = true;
}
}
Clicking on the Column Header you can use the listView1_ColumnClick(object sender, ColumnClickEventArgs e)
event.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With