this.dgvParent.Columns["Pic"].Width = 200;  //列宽
this.dgvParent.RowTemplate.Height = 100;    //列高
datagridview.backgroundcolor //背景
        // 禁止用户改变DataGridView1的所有列的列宽  
        DataGridView1.AllowUserToResizeColumns = false;  
        //禁止用户改变DataGridView1の所有行的行高  
        dataGridView1.AllowUserToResizeRows = false;  
  
        // 禁止用户改变列头的高度  
        dataGridView1.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.DisableResizing;  
posted on 2014-07-21 14:56  清风暮雨  阅读(1147)  评论(0)    收藏  举报