Simple question about WinForms and ListView
- by Alex
Hello
I have a ListView in my WinForms application. ListWiew has 4 columns.
So i want to write string in fourth column on every LisViewItem.
When i try it.
foreach (ListViewItem item in lvData.Items)
{
item.SubItems[3].Text ="something";
}
i get an exception
InvalidArgument=Value of '4' is not valid for 'index'.
Parameter name: index
What's wrong?