private void setGyouseiCostDgvColName()
        {
            
this.dgvColName.Columns.Clear();
            
this.dgvColName.AutoGenerateColumns = false;
            DataGridViewTextBoxColumn colName 
= new DataGridViewTextBoxColumn();
            colName.Name             
= "列名";
            colName.HeaderText       
= "列名";
            colName.DataPropertyName 
= "列名";
            colName.DefaultCellStyle.Alignment 
= DataGridViewContentAlignment.MiddleLeft;
            colName.ReadOnly         
= true;
            colName.Width            
= 160;

            
this.dgvColName.Columns.Add(colName);
            
this.dgvColName.Rows.Add("a");
            
this.dgvColName.Rows.Add("b");
            
this.dgvColName.Rows.Add("c");
            
this.dgvColName.Rows.Add("d");
            
this.dgvColName.Rows.Add("e");
            
this.dgvColName.Rows.Add("f");
            
this.dgvColName.Rows.Add("g");
            
this.dgvColName.Rows.Add("h");
        }






posted on 2010-08-24 09:55 Ying-er 阅读(305) 评论(0)  编辑  收藏 所属分类: .Net

只有注册用户登录后才能发表评论。


网站导航: