I\'m using a ListView in C# to make a grid. I would like to find out a way to be able to highlight a specific cell, programatically. I only need to highlight one cell.
Figured it out. Here's code to toggle the highlight of a specific subitem.
listView1.Items[1].UseItemStyleForSubItems = false;
if (listView1.Items[1].SubItems[10].BackColor == Color.DarkBlue)
{
listView1.Items[1].SubItems[10].BackColor = Color.White;
listView1.Items[1].SubItems[10].ForeColor = Color.Black;
}
else
{
listView1.Items[1].SubItems[10].BackColor = Color.DarkBlue;
listView1.Items[1].SubItems[10].ForeColor = Color.White;
}