DevExpress GridControl 设置单元格 某一行的背景色
2017年06月08日 10:29:42 kone666 阅读数 4478
版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/kone0611/article/details/72910877
-
private void gridView1_RowCellStyle(object sender, DevExpress.XtraGrid.Views.Grid.RowCellStyleEventArgs e)
-
{
-
//第一行
-
if (e.RowHandle == 0)
-
{
-
e.Appearance.BackColor = Color.DeepSkyBlue;
-
e.Appearance.BackColor2 = Color.LightCyan;
-
}
-
//单元格
-
if (e.RowHandle == 0 && e.Column.ColumnHandle == 0)
-
{
-
e.Appearance.BackColor = Color.DeepSkyBlue;
-
e.Appearance.BackColor2 = Color.LightCyan;
-
}
-
}