Checkbox in listview control

By : leora
Source: Stackoverflow.com
Question!

Can you have a multicolumn listview control where one of the columns is a checkbox? Example code or links would be greatly appreciated.

I am using visual studio 2005

By : leora


Answers

You can set the the CheckBoxes property to true. In code this can be done like this:

listView1.CheckBoxes = true;


Add Checkbox column like below.

myListView.CheckBoxes = true;
myListView.Columns.Add(text, width, alignment);

Add ListViewItem s like below.

ListViewItem lstViewItem = new ListViewItem();
lstViewItem.SubItems.Add("Testing..");
lstViewItem.SubItems.Add("Testing1..");

myListView.Items.Add(lstViewItem);
By : CharithJ


Why dont you try for XPTable by Mathew Hall

By : chatcja


This video can help you solving your question :)
By: admin