VB.NET, How do I add a row to a datagrid in WinForms consisting of only checkboxes?

Raithlin

Executive Member
Joined
Jan 4, 2005
Messages
5,049
Meh. Misread the question in it's entirety. I guess I deserve the sideswipe to the head. ;)

Found this on MSDN: http://social.msdn.microsoft.com/fo...s/thread/827907ea-c529-4254-9b15-2e6d571f5c5b
It's only for one column (and it happens to be a checkboxcolumn), but it makes sense, and you can make it work for all columns. Essentially they create a checkbox, set the location to above the column header, and handle the checkchanged event.

Another (possible better, more complete) solution can be found here: http://techisolutions.blogspot.com/2008/02/datagridview-checkbox-select-all.html
Again, replace the "select all" code with your own "include this column in import" code - but the rest is all usable, as far as I can see.

For the sake of completeness, here's a third solution: http://www.keylimetie.com/Blog/2006/10/10/DataGridView/

I found it here: Google :p

Oh, and good luck. It's a good concept, and if Microsoft can get it right (Access import) I don't see how we can't.
 
Top