datagridview 已经绑定数据源且控件的AllowUserToAddRows设置为false时。

((DataTable)dataGridView1.DataSource).Rows.Add();向表格内添加行空行。

05-11 17:20