vb.net DataGridView 改变某个单元格字体的颜色

前端之家收集整理的这篇文章主要介绍了vb.net DataGridView 改变某个单元格字体的颜色前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
Private Sub DataGridView1_CellFormatting(ByVal sender As Object,ByVal e As DataGridViewCellFormattingEventArgs) Handles DataGridView1.CellFormatting If e.Value.ToString = "未处理" Then e.CellStyle.ForeColor = Color.Red End If If e.Value.ToString = "已处理" Then e.CellStyle.ForeColor = Color.LimeGreen End If If e.Value.ToString = "处理中" Then e.CellStyle.ForeColor = Color.OrangeRed End If End Sub 原文链接:https://www.f2er.com/vb/257861.html

猜你在找的VB相关文章