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;
}

 

posted @ 2019-01-02 14:11  A-GREATE-USERNAME  阅读(886)  评论(0编辑  收藏  举报