//设置控件可见
this.dataGridView1.Visible = true;
//指定第三列的默认下层背景色。
//this.dataGridView1.Columns[3].DefaultCellStyle.BackColor =System.Drawing.Color.Blue;
//指定背景上、下层颜色。
this.dataGridView1.DefaultCellStyle.BackColor = System.Drawing.Color.White;//默认下层背景色
this.dataGridView1.AlternatingRowsDefaultCellStyle.BackColor = System.Drawing.Color.GreenYellow;//默认上层背景色
//去掉左侧的行标题
//this.dataGridView1.RowHeadersVisible = false;
//禁止用户编辑单元格
this.dataGridView1.ReadOnly = true;
//禁止用户调整列和行
this.dataGridView1.AllowUserToResizeColumns = false;
this.dataGridView1.AllowUserToResizeRows = false;
//修改当前选中行的背景色和前景色
this.dataGridView1.
this.dataGridView1.Visible = true;
//指定第三列的默认下层背景色。
//this.dataGridView1.Columns[3].DefaultCellStyle.BackColor =System.Drawing.Color.Blue;
//指定背景上、下层颜色。
this.dataGridView1.DefaultCellStyle.BackColor = System.Drawing.Color.White;//默认下层背景色
this.dataGridView1.AlternatingRowsDefaultCellStyle.BackColor = System.Drawing.Color.GreenYellow;//默认上层背景色
//去掉左侧的行标题
//this.dataGridView1.RowHeadersVisible = false;
//禁止用户编辑单元格
this.dataGridView1.ReadOnly = true;
//禁止用户调整列和行
this.dataGridView1.AllowUserToResizeColumns = false;
this.dataGridView1.AllowUserToResizeRows = false;
//修改当前选中行的背景色和前景色
this.dataGridView1.