Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.

How to: Add Columns to the Windows Forms ListView Control Using the Designer

The Windows Forms ListView control can display multiple columns for each list item when in the Details view. You can use the columns to display several types of information about each list item. For example, a list of files could display the file name, file type, size, and date the file was last modified. For information on populating the columns once they are created, see How to: Display Subitems in Columns with the Windows Forms ListView Control.

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

NoteNote:

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 Visual Studio Settings.

To add columns in the designer

  1. In the Properties window, set the control's View property to Details.

  2. In the Properties window, click the Ellipsis button (VisualStudioEllipsesButton screenshot) next to the Columns property.

    The ColumnHeader Collection Editor appears.

  3. Use the Add button to add new columns. You can then select the column header and set its text (the caption of the column), text alignment, and width.

Community Additions

ADD
Show:
© 2015 Microsoft