private void gridView采样标本接收_CustomDrawCell(object sender, DevExpress.XtraGrid.Views.Base.RowCellCustomDrawEventArgs e)
{
int iHandle = e.RowHandle;
if (e.Column.Caption == "-")
{
DataRow dr_gridView_Serious = gridView采样标本接收.GetDataRow(iHandle);
if (dr_gridView_Serious == null) { return; }
string strREPORTSTATUS = dr_gridView_Serious[TableField.T_LIS_SAMPLERECEIVE_REPORTS.PULLSTATUS] == null ? "" : dr_gridView_Serious[TableField.T_LIS_SAMPLERECEIVE_REPORTS.PULLSTATUS].ToString();
if (string.IsNullOrWhiteSpace(strREPORTSTATUS))
{
return;
}
else
{
Color appNotPassDefault = e.Appearance.BackColor;
if (strREPORTSTATUS == EnumYesNo.YES.ToString("d"))
{
e.Appearance.BackColor = Color.LightGreen;
}
else
{
e.Appearance.BackColor = Color.LightYellow;
}
}
}
}
DevExpress中的GridView(GRIDCONTROL)根据单元格(CELL)的值,控制单元格(CELL)背景颜色
最新推荐文章于 2024-05-24 15:38:04 发布