我有一个DataGridView有两列的控件.文本的默认颜色为黑色.是否可以将整个第二行的前色设置为灰色?(或任何其他颜色)..
COLUMN1 | COLUMN2
-----------------
black | gray
black | gray
black | gray
Run Code Online (Sandbox Code Playgroud)
请帮忙..谢谢.
Your subject and question are confusing, one refers to the column and one to the rows but anyway.
grid.Columns[1].DefaultCellStyle.ForeColor = Color.Gray;
Run Code Online (Sandbox Code Playgroud)
should handle the column color.
grid.Rows[1].DefaultCellStyle.ForeColor = Color.Gray;
Run Code Online (Sandbox Code Playgroud)
should handle the row color.
| 归档时间: |
|
| 查看次数: |
13262 次 |
| 最近记录: |