我想通过该代码只为空单元格着色。但我让所有的细胞都上色了。谁能告诉我我的错在哪里。。
private void gridView3_RowCellStyle(object sender, DevExpress.XtraGrid.Views.Grid.RowCellStyleEventArgs e)
{
GridView View = sender as GridView;
if(e.Column.FieldName == "First Name")
{
string category = View.GetRowCellDisplayText(e.RowHandle, View.Columns["First Name"]);
if(category != "")
{
e.CellStyle.BackColor = Color.DeepSkyBlue;
}
}
}