C#怎么去掉DataGridView中最后空白的一行

2024-11-24 18:36:32
推荐回答(2个)
回答1:

//Load 事件里面写如下语句
private void Form1_Load(object sender, EventArgs e)
{
this.dataGridView1.AllowUserToAddRows = false;
}

回答2:

//Load 事件里面写如下语句
private void Form1_Load(object sender, EventArgs e)
{
this.dataGridView1.AllowUserToAddRows = false;
}