Before adding items to a listview, set the listview’s View property to Detail. This allows the definition of multiple columns.
Now, the individual columns can now be defined. In this example, I will create and use a 4-column listview. To create the listview, use the Columns property and define the Name and Text.
Column Definition
Defining all four columns creates this listview:

Listview and properties
Each row in the listview is a ListViewItem. Each column in a ListViewItem is a SubItem. Each SubItem is added to each ListViewItem in the order the columns are defined.
These are the steps taken to add multiple ListViewItems (or rows) to a listview:
- Notify the listView control that an update is about to begin
- Clear any existing listViewItems
- Create an individual ListViewItem
- Add the subItems
- Notify the listView control that the update has ended
- Notifi the listView control to refresh itself so that it will display the new rows
int i = 1; lstXmlItems.BeginUpdate(); lstXmlItems.Items.Clear(); foreach (var item in bools) { ListViewItem row = new ListViewItem(i.ToString()); row.SubItems.Add(item.EventId); row.SubItems.Add(item.Name); row.SubItems.Add(item.WordPos); lstXmlItems.Items.Add(row); i++; } lstXmlItems.EndUpdate(); lstXmlItems.Refresh();
great post..
In the same way I want to add a row with following items (Cloumns):
1. CheckBox
2. Name
3. Address
4. ImageButton/Button/Image
Is it possible ?
Please tell me how can I creae suhlist view.. Its urgent.
Thanks in advance.
Rishi –
Check out the ‘Bind List to a DataGridView’ I just uploaded. Please let me know if that helps.
Good luck!
Jim
Nice Post…
Very usefull one.
Thanks for guiding.
Its like you read my mind! You seem to know a lot
about this, like you wrote the book in it or something.
I think that you can do with some pics to drive the
message home a bit, but other than that,
this is wonderful blog. A great read. I will certainly be back.