This object represents a column header in a ListView control. The ColumnHeaders collection contains one or more ColumnHeader objects.
listview.ColumnHeader
The ColumnHeader object supports the following properties:
With a ColumnHeader object, a user can accomplish the following tasks:
The ListView control always contains a column named Column 1. This column contains the actual ListItem objects, not their subitems. The second column, named Column 2, contains subitems. Therefore, there always is one more ColumnHeader object than subitems, and the ListItem object's SubItems property is a 1-based array of size ColumnHeaders.Count –1.
The number of ColumnHeader objects determines the number of subitems each ListItem object in the control can have. When you delete a ColumnHeader object, all the subitems associated with the column also are deleted, and each ListItem object's subitem array shifts to update the indexes of the ColumnHeader, causing the remaining column header's SubItemIndex properties to change.
You can view ColumnHeader objects in Report view only. However, you can add ColumnHeader objects to a ListView control at both design time and run time.