天天看點

C#程式設計-21:DataGridview清空資料

datagridview .DataScous=null;

datagridview .DataBand();

或者運作這個方法

foreach (GridViewRow row in GridView1.Rows)

       {

           row.Cells.Clear;

       }

在或者

datagridview.rows.clear();

參考來源:

https://zhidao.baidu.com/question/78044565.html