PDA

Click to See Complete Forum and Search --> : refreshing datagrid


EyeTalion
Dec 20th, 2002, 07:52 AM
After I do a delete from my datagrid the record still shows on the grid unless you leave the page and come back. I placed

'refresh the Datagrid
OleDbDataAdapter1.Fill(DataSet11)
DataGrid1.DataBind()

after the delete, but it keeps the old data in the grid and give me the new data from the database. What is the correct way to refresh the grid after a delete?

ChrisWise
Jan 2nd, 2003, 04:39 AM
What you want to do is execute the query again then fill the dataset.

Chris

Lethal
Jan 2nd, 2003, 09:58 AM
You have to restablish the communication between the dataset and the datagrid. The solution is setting the datasource property on the datagrid to the datasource (dataset). However, it all depends on how you actually have everything setup.

Cheers