dataGridView常见操作
作者:互联网
//不显示出dataGridView1的最后一行空白
dataGridView1.AllowUserToAddRows = false;
//是否可以编辑
dataGridView1.ReadOnly = true;
//设置标头单元格 并赋值
int RowNumber=0;
foreach (DataGridViewRow row in this.dataGridView1.Rows)
{
row.HeaderCell.Value = RowNumber.ToString();
RowNumber++;
}
标签:Rows,false,int,常见,RowNumber,dataGridView,dataGridView1,操作,row 来源: https://www.cnblogs.com/qixiaolan/p/12752113.html