April 11th, 2013, 12:53 PM
Clear datagridview rows
I've been trting to clear datagridview rows so it can be populated again. Sounds simple, but most of the common solutions dont work.
DatagridView1.Rows.Clear(), setting rowcount=0, setting datasource=null wont work. They give errors clearly.
Using a foreach and clearing the rows using Remove() seems to be work somewhat - I believe its not clearing the display though.
April 11th, 2013, 01:12 PM
Re: Clear datagridview rows
found the soln: settings its Dataset to null is the only solution that works.
Tags for this Thread
Click Here to Expand Forum to Full Width
This is a Codeguru.com survey!