I have a ListView with checkboxes:
listView1.View = View.Details;
listView1.CheckBoxes = true;
ListViewItem item1 = new ListViewItem("ONE");
ListViewItem item2 = new ListViewItem("TWO");
ListViewItem item3 = new ListViewItem("THREE");
listView1.Items.Add(item1);
listView1.Items.Add(item2);
listView1.Items.Add(item3);
I would like to disable only the second checkbox, is it possible?
I think you can do that with owner drawing using the DrawItem event. In the event handler, draw a rectangle filled with SystemColors.Window over the check box to hide it.
I have also implemented check box hiding in 3rd party control Better ListView Express. Items have a boolean property named AllowShowCheckBox which you can set to false on every item separately. It also supports three-state check boxes.