So, here's my question: Why won't the code in the first snippet work when the second one works fine. Also, I have set the view property to details. I've read all over how to add lvi's to the listview, and it fails every time... except for then I do it manually.
So, this doesn't work...
// Iterating through the rows...
for (int x = 0; x < numRows; x++) {
row = new List<string>();
// Iterating through the cols...
for (int y = 0; y < numCols; y++) {
row.Add(data[y][x]);
}
lv.Items.Add(new ListViewItem(row.ToArray()));
}
But this will work:
lv.Items.Add(new ListViewItem("foo"));