Search code examples
c#listviewlistviewitembackcolor

c# listview backcolor is not on all row in the begining


I have listview, and I initial it with BackColor to the first item :

 listView1.Items[0].BackColor = Color.LightBlue;

the problem is that in the beginning, the back color is only behind the item itself, for example: the first item is "first" and BackColor will be behind the word "first".

now, if I press anyware the BackColor is ok and will be behind all row.

why is that ?


Solution

  • the problem was that "FullRowSelect" property was "false" needs to be "true"