C#中,如何datagridview 中某一行的字体样式、颜色? 200
展开全部
所有行:
dataGridView1.RowsDefaultCellStyle.Font = new Font("宋体", 9, FontStyle.Strikeout);
dataGridView1.RowsDefaultCellStyle.ForeColor = Color.Blue;
dataGridView1.RowsDefaultCellStyle.BackColor = Color.Red;
选中行
dataGridView1.SelectedRows[0].DefaultCellStyle.Font = new Font("宋体", 9, FontStyle.Strikeout);
dataGridView1.SelectedRows[0].DefaultCellStyle.ForeColor = Color.Blue;
dataGridView1.SelectedRows[0].DefaultCellStyle.BackColor = Color.Red;
dataGridView1.RowsDefaultCellStyle.Font = new Font("宋体", 9, FontStyle.Strikeout);
dataGridView1.RowsDefaultCellStyle.ForeColor = Color.Blue;
dataGridView1.RowsDefaultCellStyle.BackColor = Color.Red;
选中行
dataGridView1.SelectedRows[0].DefaultCellStyle.Font = new Font("宋体", 9, FontStyle.Strikeout);
dataGridView1.SelectedRows[0].DefaultCellStyle.ForeColor = Color.Blue;
dataGridView1.SelectedRows[0].DefaultCellStyle.BackColor = Color.Red;
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询