How change color line in listview .
for example if line == 4
then line is red
If you want to go through the whole list and colour each item conditionally, then you can use:
foreach (ListViewItem lvw in myListView.Items)
{
if (lvw.SubItems[x].ToString() == "True")
{
lvw.BackColor = Color.Red;
}
}
Or if you always want to color the item at index 4:
myListView.Items[4].BackColor = Color.Red;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With