private void gridView1_RowCellStyle(object sender, DevExpress.XtraGrid.Views.Grid.RowCellStyleEventArgs e) { //偶數行奇數列||奇數行偶數列 if ( e.RowHandle != grid ...
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;
}