[英]Color coding cells in datagridview based on cell value
尝试这个:
For each row As DataGridViewRow In Datagridview1
If row.Cells(3).Text.Trim = "High" Then
row.Cells(3).Style.Backcolor = Color.Red
Else If row.Cells(3).Text.Trim = "Low" Then
...
Else If row.Cells(3).Text.Trim = "Medium" Then
...
End If
Next
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.