Clear datagridview rows
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: Clear datagridview rows

Hybrid View

  1. #1

    Post 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.

  2. #2

    Re: Clear datagridview rows

    found the soln: settings its Dataset to null is the only solution that works.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center