|
-
September 28th, 1999, 09:04 AM
#1
formatting Listview
I am using Listview control to display the data from my database. I am using columnheaders property to display column headers:
ListView1.ColumnHeaders.Add , , "Count", ListView1.Width / 4
But I am not seing the colmn headers when i RUN the program. Also the data is displayed in an irregular fashion.
Can someone let me know why?
Please
-
September 28th, 1999, 01:50 PM
#2
Re: formatting Listview
Try this code for the column Header
You also need to make sure that the hideColumnHeaders Property is = False,
You can do this either at runtime or design time
Dim colhead as ColumnHeader
set colhead = ListView1.ColumnHeaders.Add()
colhead.Text = "Count"
colhead.Width = ListView1.Width / 4
for the irregular data, what is specifically happening?
-
September 28th, 1999, 03:27 PM
#3
Re: formatting Listview
It sounds like you haven't got the ListView 'view' property set to lvwReport - try this code where you add the column headers :
With ListView1
.View = lvwReport
.ColumnHeaders.Add , , "Column 1"
.ColumnHeaders.Add , , "Column 2"
.ColumnHeaders.Add , , "Column 3"
'
' etc
'
End With
Chris Eastwood
CodeGuru - the website for developers
http://codeguru.developer.com/vb
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|