海滨小城

.net研究

导航

datagridview Default

//dataGridView1.Columns[0].Visible = false;

//选择的一行  显示颜色
   this.dataGridView1.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
   this.dataGridView1.DefaultCellStyle.SelectionBackColor = Color.YellowGreen;

this.dataGridView1.ColumnHeadersVisible = true;                                 //显示列标

 


 this.dataGridView1.BackgroundColor = Color.Black;         //背景

this.dataGridView1.Columns[3].Visible = false;                 //列显示
this.dataGridView1.Columns[0].Width = 75;                 //列的宽度
            this.dataGridView1.ReadOnly = true;

 

posted on 2012-05-30 15:34  海滨小城  阅读(176)  评论(0编辑  收藏  举报