you'll want to create a listviewitem. add any sub items. and then add the lvitem to the list view. set the list box in details mode to show multiple columns.
Someone else might have a better way, but this is how i tackled it for a recent project.
I wanted to show a list of files in the list box. column 1 is a counter, column 2 is the url, colmuns three is the status. here's the code
Code:
do
{
servPath = FolderURL.Peek().ToString();
DirList = FtpDirList(FolderURL.Pop());
Match fi;
List<string> Fname = new List<string>();
try
{
for (int i = 0; i < DirList.Length; i++)
{
fi = FileInfo(DirList[i]);
ListViewItem item = new ListViewItem((lvFiles.Items.Count + 1).ToString());
if (fi.Groups["dir"].Value.Equals("<DIR>"))
{
item.SubItems.Add(servPath + "/" + fi.Groups["name"].Value + "/");
FolderURL.Push(servPath + "/" + fi.Groups["name"].Value);
}
else
item.SubItems.Add(servPath + "/" + fi.Groups["name"].Value);
item.SubItems.Add("FTP");
lvFiles.Items.Add(item);
}
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
} while (FolderURL.Count > 0);