1.

How to Clear or blank the GridView data?

Answer»

How to Clear or BLANK the GRIDVIEW data?
Below are the DIFFERENT METHODS to clear or blank Gridview with very less line of CODE
(1)First Method
GridView1.DataSource = null;
GridView1.DataBind();

(2)Second Method
GridView1.Rows.Clear();
GridView1.Refresh();

(3)Third Method
dataGridView1.Rows.Clear()
dataGridView1.DataBind();

(4)Fourth Method
dataGridView.DataSource=null;
dataGridView.Rows.Clear();



Discussion

No Comment Found