private void dgv_CellFormatting(object sender, DataGridViewCellFormattingEventArgs e)
{}//修改
DataGridViewCellStyle sty=new DataGridViewCellStyle();
dgv.Rows[e.RowIndex].DefaultCellStyle = sty;
dataGridView1.Rows[i].DefaultCellStyle.BackColor = Color.Gold;第一次无效
最新推荐文章于 2024-04-23 13:32:21 发布