在数据网格中更改颜色 [英] changing color in datagrid
本文介绍了在数据网格中更改颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在数据网格视图中更改特定行的颜色
How to change the colour of particular row in data Grid view
推荐答案
单元格值的不同颜色....您可以尝试以下操作:
Different colors for the cell values.... u can try this:
<pre lang="vb">
For Each row As DataGridViewRow In Me.DG.Rows
Dim deger as String
deger = row.Cells(2).Value
If deger="Giris" Then row.DefaultCellStyle.BackColor = Color.IndianRed
If deger="Cikis" Then row.DefaultCellStyle.BackColor = Color.LightSalmon
Next
请参见此处 [ ^ ].
这篇关于在数据网格中更改颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文