Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to clear the datagridview

Status
Not open for further replies.

beanNut

IS-IT--Management
Jun 2, 2004
28
US
I populated a datagridview with some rows from a view.
It works great.

I would like to rebuild the view dynamically depending on which Table Name I select from my other grid. The view correctly contains the rows from the new table.

Now I am working on the data grid view in the form.

HOW do I erase the data rows and heading from the data grid view ?? ....

I need to erase the data rows from the previous viewing and then populate the data grid view object with the new data. It keeps appendding new data to the previous data.

I tried datagridview.column.clear().

Thanks for you help.
If you could provide a wee bit of code snippet, appreciated.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top