Hi guys,
I have a ListView that displays files from a folder.
I have added 3 columns, File, Name and date.
The Listview is populated through a for each loop. When I'm in debugging mode/runing the program, and I press the bottom to populate the ListView, the only colum that remains is the "File" the other ones disapear for some reason.
here is the code:
Any help will be appreciated,
Mike
I have a ListView that displays files from a folder.
I have added 3 columns, File, Name and date.
The Listview is populated through a for each loop. When I'm in debugging mode/runing the program, and I press the bottom to populate the ListView, the only colum that remains is the "File" the other ones disapear for some reason.
here is the code:
vb script Code:
Dim di As New IO.DirectoryInfo(path) Dim diar1 As IO.FileInfo() = di.GetFiles() Dim dra As IO.FileInfo Try ListView1.View = View.Details ListView1.Items.Clear() ListView1.Columns.Clear() ListView1.Columns.Add("Filename", 250, HorizontalAlignment.Left) Dim lCurrent As ListViewItem For Each dra In diar1 lCurrent = ListView1.Items.Add(dra.Name) lCurrent.SubItems.Add(dra.LastWriteTime) lCurrent.Tag = dra Next Catch ex As Exception MessageBox.Show(ex.Message) End Try
Any help will be appreciated,
Mike