WinForm------GridControl单元格内容修改外表样式

private void gridView1_CustomDrawCell(object sender, DevExpress.XtraGrid.Views.Base.RowCellCustomDrawEventArgs e)
{
  if (e.Column.FieldName == "Examine")
  {
    if (e.DisplayText.Equals("已审批"))
    {
      e.Appearance.ForeColor = Color.Red;
    }
    else
    {
      e.Appearance.ForeColor = Color.Blue;
    }
  }
}

posted @ 2019-06-11 17:12  爱笑的小宇宙  阅读(498)  评论(0编辑  收藏  举报