How to clear a datagrid on a button click, DOT NET Programming

Assignment Help:

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

 


Related Discussions:- How to clear a datagrid on a button click

I want a c# school project, I want a C# school project Project Descripti...

I want a C# school project Project Description: The project is made in C# and haves a database connection. We have some small problems asking up data from the database.

Wp7 get data from public api with xml or json, WP7 get data from public API...

WP7 get data from public API with XML or JSON Project Description: Hello, I'm seeking someone who knows his way around using an API with XML or JSON output in a windows phone

Classic ado and ado.net , What are major difference between classic ADO and...

What are major difference between classic ADO and ADO.NET ? Some major differences between the classic ADO & ADO.NET are as follows: 1) As in the classic ADO we had server a

Asp.net 2.0 application port to asp.net mvc, Project Description: Legacy...

Project Description: Legacy ASP.NET application for managing tasks for a private client needs a complete re-write. The application has approximately 2500 lines of code, combi

Use of connection object, What is the use of connection object? The con...

What is the use of connection object? The connection objects are used to connect a data to the Command object. 1)An OleDbConnection object is used with the  OLE-DB provider

To know a state of a thread, How can we know a state of a thread? The "...

How can we know a state of a thread? The "ThreadState" property is used to get complete detail of a thread. The Thread can have one or a combination of status.System.Threading.

Allow a webpage and restrict access to other domains, We previously use Sit...

We previously use Site content filtering inside Netkiosk But at present this blocks sites. or keywords We now also require a Whitelist that allows. 1) An entire domain www

Explain in brief dataadapter class in ado.net, Explain in brief DataAdapter...

Explain in brief DataAdapter class in ADO.NET. The DataAdapter class retrieves data from the database, keeps data in a dataset, and reflects the changes made in the dataset to

Why is it preferred to not use finalize for clean up, The Problem with fina...

The Problem with finalize is that the garbage collection has to make 2  rounds in order to remove the  objects which have finalize methods. The figure below will make things cle

Describe the disconnected architecture of ado.net, Describe the disconnecte...

Describe the disconnected architecture of ADO.NET's data access model. ADO.NET maintains a disconnected database access model, which means, the application never remains linked

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd