Howto: DataGridView VB.NET 2005 - How can I set cell type to checkbox programmatically?

  • Thread starter Thread starter Sam Malone
  • Start date Start date
S

Sam Malone

Can anyone show me (sample code???) how to programmatically set a column
type to "CheckBox" in code (as opposed to the designer)? The datagridview
isn't bound to a design-time dataset so until it executes there are no
columns for which I can select a column type.
 
Eureka, I've got it!!
I was trying to "change" a textbox type to a checkbox after the
"AutoGenerate" had created it. Turns out I have to turn off AutoGenerate and
create it as a CheckBox type in the first place. It's drudgery but it works.
 
Back
Top