private void gridView1_RowCellStyle(object sender, DevExpress.XtraGrid.Views.Grid.RowCellStyleEventArgs e) { try { if (e.RowHandle >= 0) { decimal d = ReturnObjectToDecimal(GridView1.GetRowCellDisplayText(e.RowHandle, GridView1.Columns["缺料数量"]), 6); if (d > 0) { e.Appearance.BackColor = Color.Tomato; } } } catch { } }