how to clear a datagrid on a button clickyou


How to clear a datagrid on a button click?

You require 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

 

Request for Solution File

Ask an Expert for Answer!!
DOT NET Programming: how to clear a datagrid on a button clickyou
Reference No:- TGS0310387

Expected delivery within 24 Hours