Digital Colony!

Clear GridView Control in ASP.NET

Clearing a populated GridView control can be done in just 3 lines of code. Create an empty DataTable and then bind it to the Gridview.
DataTable dt = new DataTable();
GridView1.DataSource = dt;
GridView1.DataBind();

Labels:

posted by MAS on Jan 6,2008

If you found this site helpful, consider buying me a cup of coffee. Smile

Digital Colony Copyright © 1999-2010 XHTML   508
Try...Catch Disclaimer: For brevity many examples do not include error handling. That is your responsibility.