且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

刷新GridView控件在C#中添加或删除新的记录后,

更新时间:2023-12-03 13:11:40

您需要将网格重新绑定到数据源:

You need to rebind the grid to the datasource:

//delete row from the database

GridView1.DataSource = SomeDataRetrievalMethod(); //retrieve the data from the database
GridView1.DataBind();