第一种:dataGridView.DataSource = null;
第二种: while (this.dataGridView.Rows.Count != 0)
{
this.dataGridView.Rows.RemoveAt(0);
}
第一种:dataGridView.DataSource = null;
第二种: while (this.dataGridView.Rows.Count != 0)
{
this.dataGridView.Rows.RemoveAt(0);
}