- C#, C♯, C#相談室 Part86 [転載禁止]©2ch.net
906 :デフォルトの名無しさん[sage]:2015/03/23(月) 20:22:59.39 ID:ai9MTwtK - >>902
.Cells[3].とか直接指定しないで、CellFormattingの対象になっているセルで判断してみたらどう? private void dataGridView1_CellFormatting(object sender, DataGridViewCellFormattingEventArgs e) { var text = Convert.ToString(e.Value); if (text == "moge" ) { e.CellStyle.Font = new Font(dgv.DefaultCellStyle.Font, dgv.Font.Style | FontStyle.Bold); } }
|
|