110,499
社区成员
发帖
与我相关
我的任务
分享
private void dataGridView1_CellFormatting(object sender, DataGridViewCellFormattingEventArgs e)
{
if (this.dataGridView1.Columns[e.ColumnIndex].Name != "姓名")
{
if (e.Value != null)
{
int num = (int)e.Value;
if (num <= 60)
{
e.CellStyle.BackColor = Color.Red;
}
}
}
}