c# - Is there a way to set the BackColor of Winforms ListView cells individually? -


i want color each list view cell's backcolor using different color. possible?

to change colour of cell's backcolor, can this:

listview1.items[0].useitemstyleforsubitems = false; listview1.items[0].subitems[0].backcolor = color.green; listview1.items[0].subitems[1].backcolor = color.orange; listview1.items[0].subitems[2].backcolor = color.red; // change 0 in items[0] whatever row want, // , 0, 1 or 2 in subitems[0] whatever column want. 

the first line,

listview1.items[0].useitemstyleforsubitems = false; 

will make row of cells not coloured same colour.

here demo picture:

enter image description here

hope helps!


Comments

Popular posts from this blog

How do you change vbulletin's home page to the forums instead of the default (CMS or Activity Stream)? -

c++ - Troubles when compiling phash program -