I will put an alternate color in the listview rows.
I saw this link , but I am using .Net Framework 3.5 SP1, so I can not use it.
I used the following code, but it has a problem with sorting a ListView
ListViewItem newListViewItem = new ListViewItem(
new string[] { item.name.ToString(),
item.code.ToString() });
newListViewItem.BackColor = new Color(240,240,240);
newListViewItem.UseItemStyleForSubItems = true;
newListViewItem.Font = new Font("Tahoma", 9);
listView1.Items.Add(newListViewItem);
Could you advise me how I can do this?
source
share