Disable single checkbox in checkbox listview

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 this possible?

Thanks in advance.

+3
source share
1 answer

I think you can do this with an owner drawing using the DrawItem event . In the event handler, draw a rectangle filled with SystemColors.Window to hide it.

, " ListView Express" . AllowShowCheckBox, false . .

+2

All Articles