This c# code shows you how you coloring every second row in a ListView:
int i = 0; foreach (ListViewItem item in listView1.Items) { if (i++ % 2 == 1) { item.BackColor = Color.LightGray; item.ForeColor = Color.BlueViolet; item.UseItemStyleForSubItems = true; } }
Antworten