我想在 DGV 中将特定行的字体更改为粗体,其中列(名称“vu”)中有“false”值。
我的代码有效,但问题是该行的行为就像有循环(出现并快速重复地消失)
private void DGV_boiteReception_CellFormatting(object sender, DataGridViewCellFormattingEventArgs e)
{
DataGridViewRow row = DGV_boiteReception.Rows[e.RowIndex];
DataGridViewCellStyle style = new DataGridViewCellStyle();
style.Font = new Font(DGV_boiteReception.Font, FontStyle.Bold);
if (row.Cells["vu"].Value.ToString() == "False")
{
DGV_boiteReception.Rows[e.RowIndex].DefaultCellStyle = style;
}
}
SMILET
偶然的你
随时随地看视频慕课网APP
相关分类