C# code
this .dataGridView1.AllowUserToAddRows = false ;
或者在属性中更改AllowUserToAddRows为false
this .dataGridView1.AllowUserToAddRows = false ;
或者在属性中更改AllowUserToAddRows为false