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

  1. Select the ListView control.

  2. In the Properties window, click the Ellipsis (The Ellipsis button (...) in the Properties window of Visual Studio.) button next to the Items property.

    The ListViewItem Collection Editor appears.

  3. To add an item, click the Add button. You can then set properties of the new item, such as the Text and ImageIndex properties.

  4. To remove an item, select it and click the Remove button.

See also