Alex
Answered On : Dec 14th, 2005
Hi,
You need to Clear the DataSource of the dadaGrid.
So try this:
dataSet1.Clear();
dataGrid1.DataSource = dataSet1.TableNameHere.DefaultView; or
C#: dataGrid1.DataSource = null;
VB: dataGrid1.DataSource = nothing
Login to rate this answer.
Easy way to clear a grid without creating new dataset, but this method loses headers also.
datagrid1.datasource=""
datagrid1.Databind()
Login to rate this answer.
Lets say your grid id is dgCompliance, so to make it empty just write following code in vb.net:
dgCompliance.DataSource = Nothing
dgCompliance.DataBind()
Login to rate this answer.