DGV设置单元格背景颜色(inf二次开发)
foreach (var dr in dgvOdExec.Grid.Rows) { if (dr.Cells[nameof(MedicalSkillsVo.OdTypCode)].Text == ExtraCharacterStrDefine.TREAT) { dr.Cells[nameof(MedicalSkillsVo.ExecCnt)].Appearance.BackColor = Color.FromArgb(0, 255, 255); dr.Activation = Activation.AllowEdit; } else { dr.Activation = Activation.NoEdit; } }