开发者

How can I set the background color of individual cells in a DataGridView?

开发者 https://www.devze.com 2023-01-06 09:09 出处:网络
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 c

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

精彩评论

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