Clear Datagridview Rows

In VS VB.Net 2005: Clear values in attached "Test1 w-values" datagridview for next record.
See attached "Test2 no values".

Sample code would be very much appreciated.
Test1-w-values.pdf
Test2--no-values.pdf
dave_skyAsked:
Who is Participating?
 
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
I'm not sure what you men by "all the datagridviews in a table". A DataGridView is a control you place on a form. A "Table" could mean many things.

You could always remove all the rows:

YourDataGridView.Rows.Clear
0
 
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
You can set the Datasource of your DGV to nothing:

YourDataGridView.DataSource = Nothing
0
 
dave_skyAuthor Commented:
That code works to clear the datagridview rows, but it also clears all of the datagridviews in the table. I need code to edit only one instance.

Can you help?
0
 
dave_skyAuthor Commented:
Thanks
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.