how to remove all rows from datatable in c#
  • how to remove all rows from datatable in c#
  • 2 Comments sorted by
  • this code is only clear the Datagridview rows but not in DB
    List<Employee> _emplist=new List<Employee>();
    datagridview1.Datasource=new List<Employee>();
    datagridview1.Datasource=_emplist;
  •  if (this.EmployeedataGridView.DataSource != null)
                {
                    this.EmployeedataGridView.DataSource = null;
                }
                else
                {
                    this.EmployeedataGridView.Rows.Clear();
                }

Howdy, Stranger!

It looks like you're new here. If you want to get involved, or you want to Ask a new Question, Please Login or Create a new Account by Clicking below

Login with Facebook

Popular Posts of the Week

    Optimum Creative