Link to home
Start Free TrialLog in
Avatar of gizz
gizz

asked on

Using Column Headers with List Views

Hi,
I'm trying to set up a very simple grid with columns and rows and have elected to use the List View control.

I want it more or less to resemble the List View found in Windows Explorer where you have column headers such as 'Modified', 'Size', 'Type' etc.

However, when I create a new column header with text 'Column 1' the rows appear but the column header does not appear at all - how do I make the column header appear, please?
ASKER CERTIFIED SOLUTION
Avatar of VBGuru
VBGuru
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of caraf_g
caraf_g

The answer is buried inside VBGuru's answer: the view MUST be lvwReport or else you never get to see any column headers.

There also is a HideColumnHeaders property that you can set to True if your list view is in lvwReport view and you do NOT want to see column headers.
Avatar of gizz

ASKER

Yes, it's the right clicking of the List View in design time that I didn't know about.
You can also set these properties at runtime:

YourListView.View = lvwReport

for example.