Dev修改gridview 背景色
程序员文章站
2024-02-01 13:39:22
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;
}
上一篇: 网赚:理想很美好 现实却很残酷
下一篇: Python如何发布程序的详细教程