Details View in Listview

D

Dilip

hi all

i m trying to make a windows explorer in my project

where i need details view with some columns.

but when i give this code at form load

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load_

ListView1.View = View.Details

ListView1.Show()
End sub

it doesn't show anything in listview mean just blank listview
it shows only vertical scroll bar



but when i use
ListView1.View = View.List
then it shows all files and folder


since i want to show some attributes in same row for that file
i have to use details


can anyone help me to show ViewDetails in Listview
without this i cnt go with next step
thanks in advance

regards
Dilip Yadav
 
C

Claes Bergefall

You need to add columns to your list view. For example:

ListView1.Columns.Add("Name")
ListView1.Columns.Add("Attributes")
....
Dim item As ListViewItem = ListView1.Items.Add("MyFile")
item.SubItems.Add("R-H")


/claes
 
D

Dilip

hi Claes & Cor

first of all thanks 2 both of u

well i have already used this cod
ListView1.Columns.Add("Name", -2, HorizontalAlignment.Center)
ListView1.Columns.Add("Type", -2, HorizontalAlignment.Center)

but still it doesnt show anything at listview

i get only vertical scroll bar
Do u people have any other suggestion your most welcome
if u send reply at group

i ve searched many sites but ,not any code ,help me for that

rest is fine
Regard
Dilip yadav

Regard
 
D

Dilip

hi claes & Cor

i have solve my problem there
was i little mistake

that i have given the
code
listview1.clear( )


at wrong place that was in Form load block
but it shoud be come with that Search Button Click Event
where i click search for Browse...........

really i got a good response
thanks again

Regard
Dilip yadav
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top