开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜