是比较的内容代码写的有问题吗 希望纠正一下
private void GridView1_RowCellStyle(object sender, RowCellStyleEventArgs e)
{
if (e.RowHandle > 0)
{
DataRow dr = this.gridView1.GetDataRow(e.RowHandle);
if (e.Column.FieldName == "FDATE")
{
if (Convert.ToInt32(e.CellValue.ToString()) < Convert.ToInt32(DateTime.Now.ToShortDateString().ToString()))
{
e.Appearance.BackColor = Color.Red;
}
}
if (Convert.ToInt32(dr["FQTY"]) >= Convert.ToInt32(dr["FSTOCKQTY"]))
{
e.Appearance.BackColor = Color.Yellow;
}
}