Friday, May 16, 2008

How to change background color of Listview in C#

Hello guyz. I have simple code here to change the background color of Listview and it's cells during runtime.

Step 1:
Create first a Listview.

Step 2:
Put this code at your form_load event.

listView1.Items.Add("Hello World");
listView1.Items[0].SubItems[0].BackColor = Color.Blue;


Saqib Atiq said...

thanks a lot bro for the idea, i have been looking for this little shit since long and found a lot people with complicated ideas, but you shown the simplest way..thanks again you saved my day ... :)

Anonymous said...

ListView control custom feature in C#