How can I set the background color of individual cells in a DataGridView?
I have a DataGridView
and I'm trying to change cell backgrou开发者_JAVA百科nds based on the content of the cell. For example, if a cell's value is 5
, then the cell's background should be blue.
You could use the CellPainting event to check each cell's content and paint different background colors.
精彩评论