office politics
It's all just 1s and 0s
- Messages
- 6,555
- Location
- in the lab
I wish to find out how I can values to different columns in a listview (details mode). The code below adds items to a list view, but it only adds data to one column. The data it is adding is a URL to a file or folder. I would like to add two columns; item number and file status. item number will count the files and file status will show the file's download status. Any help would be greatly appreciated.
Code:
for (int i = 0; i < DirList.Length; i++)
{
fi = FileInfo(DirList[i]);
ListViewItem item;
if (fi.Groups["dir"].Value.Equals("<DIR>"))
{
item = new ListViewItem(servPath + "/" + fi.Groups["name"].Value + "/");
FolderURL.Push(servPath + "/" + fi.Groups["name"].Value);
}
else {
item = new ListViewItem(servPath + "/" + fi.Groups["name"].Value);
}
lvFiles.Items.Add(item);
}