-
DatagridView Clear
I am using datagridview.rows.clear() to empty a grid that i am bind the rows to using the datasource and datamember properties and the error i keep getting tells that i can't clear it. is there another way to empty the grid?
-
Have you tried setting the DataSource to Nothing? Or to a query that returns no records (e.g., SELECT * FROM Table WHERE 1 = 0)?
Phil Weber
http://www.philweber.com
Please post questions to the forums, where others may benefit.
I do not offer free assistance by e-mail. Thank you!
-
I am trying that and it still doesn't clear the grid, the old information is still there. The table i am using to load the grid with I remove then rebuild altogher, it doesn't even always have the same columns
-
This seems to work for me:
DataGridView1.DataSource = Nothing
DataGridView1.Refresh()
Phil Weber
http://www.philweber.com
Please post questions to the forums, where others may benefit.
I do not offer free assistance by e-mail. Thank you!
-
-
Have you tried using the STL? There is an algorithm called next_permutation which given a range will return true on each subsequent call until all permutations have been encountered. Works not only on strings but on any "sequence" type.
http://www.dapfor.com/en/net-suite/n...data-filtering
Similar Threads
-
By hellopraveen30 in forum .NET
Replies: 0
Last Post: 02-14-2007, 01:01 AM
-
Replies: 0
Last Post: 09-27-2006, 03:47 AM
-
By triley35 in forum .NET
Replies: 1
Last Post: 07-08-2006, 12:34 AM
-
By TigerMoonSix in forum .NET
Replies: 1
Last Post: 06-20-2006, 10:18 AM
-
By Aldo Sarmiento in forum ASP.NET
Replies: 0
Last Post: 03-01-2002, 01:26 AM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks