private void setKessantoukeiDataGridView()
{
this.dgvEvent.Columns.Clear();
DataGridViewTextBoxColumn colList = new DataGridViewTextBoxColumn();
colList.Name = "表";
colList.HeaderText = "表";
colList.DataPropertyName = "表";
colList.DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter;
colList.ReadOnly = true;
colList.Width = 200;
DataGridViewTextBoxColumn colRow = new DataGridViewTextBoxColumn();
colRow.Name = "行";
colRow.HeaderText = "行";
colRow.DataPropertyName = "行";
colRow.DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter;
colRow.ReadOnly = true;
colRow.Width = 200;
DataGridViewTextBoxColumn colCol = new DataGridViewTextBoxColumn();
colCol.Name = "列";
colCol.HeaderText = "列";
colCol.DataPropertyName = "列";
colCol.DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter;
colCol.ReadOnly = true;
colCol.Width = 200;
this.dgvEvent.Columns.Add(colList);
this.dgvEvent.Columns.Add(colRow);
this.dgvEvent.Columns.Add(colCol);
this.dgvEvent.RowHeadersVisible = false; //RowHeaderを非表示
}
posted on 2010-08-24 09:59
Ying-er 阅读(767)
评论(0) 编辑 收藏 所属分类:
.Net