How to: Add and Remove Items with the Windows Forms ListView Control Using the Designer
The process of adding an item to a Windows Forms ListView control consists primarily of specifying the item and assigning properties to it. Adding or removing list items can be done at any time.
The following procedure requires a Windows Application project with a form containing a ListView control. For information about setting up such a project, see How to: Create a Windows Forms application project and How to: Add Controls to Windows Forms.
To add or remove items using the designer
Select the ListView control.
In the Properties window, click the Ellipsis () button next to the Items property.
The ListViewItem Collection Editor appears.
To add an item, click the Add button. You can then set properties of the new item, such as the Text and ImageIndex properties.
To remove an item, select it and click the Remove button.
See also
- ListView Control Overview
- How to: Add Columns to the Windows Forms ListView Control
- How to: Display Subitems in Columns with the Windows Forms ListView Control
- How to: Display Icons for the Windows Forms ListView Control
- How to: Add Custom Information to a TreeView or ListView Control (Windows Forms)
- How to: Group Items in a Windows Forms ListView Control
.NET Desktop feedback