public void SetAlternateColors(ListView lView, Color Red, Color Blue)
{
//loop through each ListViewItem in the ListView control
foreach (ListViewItem item in lView.Items)
{
if ((item.Index % 2) == 0)
item.BackColor = Red;
else
item.BackColor = Blue;
}
}
To work with this color class, you have to include the "using System.Drawing;" namespace.