需要修改整行颜色时的写法
if (gdv.GetRowCellValue(e.RowHandle, "MessageStatus").ToString() != "发送成功") e.Appearance.ForeColor = System.Drawing.Color.Red;
需要修改某单元格颜色的写法
if (e.Column.FieldName == "MessageStatus" && e.CellValue.ToString() != "发送成功") e.Appearance.ForeColor = System.Drawing.Color.Red;