Dev修改gridview 背景色


private void gridView1_RowCellStyle(object sender, DevExpress.XtraGrid.Views.Grid.RowCellStyleEventArgs e)
{
//偶数行奇数列||奇数行偶数列
if ( e.RowHandle != gridView1.FocusedRowHandle &&
((e.RowHandle % 2 == 0 && e.Column.VisibleIndex % 2 == 1) ||
( e.Column.VisibleIndex % 2 == 0 && e.RowHandle % 2 == 1)) )
e.Appearance.BackColor = Color.AliceBlue;
}

 


作者:风无阻雨无惧,发布于:2019/01/02
原文:https://www.cnblogs.com/aj407blogs/p/10208269.html