Export (0) Print
Expand All

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 New Windows Forms Application Project and How to: Add Controls to Windows Forms.

Note Note

The dialog boxes and menu commands you see might differ from those described in Help depending on your active settings or edition. To change your settings, choose Import and Export Settings on the Tools menu. For more information, see Customizing Development Settings.

To add or remove items using the designer

  1. Select the ListView control.

  2. In the Properties window, click the Ellipsis (VisualStudioEllipsesButton screenshot) 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.

Show:
© 2014 Microsoft