摘自:http://www.cnblogs.com/jacky73/archive/2009/06/19/1506931.html
private void dataGridView1_CellFormatting(object sender, DataGridViewCellFormattingEventArgs e)
{
if (e.ColumnIndex == 1 /*绑定数据源中列的序号*/)
{
if (object.Equals(e.Value, 0))
{
e.Value = "未完成";
e.CellStyle.ForeColor = Color.Red;
}
else
{
e.Value = "已完成";
e.CellStyle.ForeColor = Color.Green;
}
}
}