Programmatically checking a checkbox in a DataGridView

PROKA

Junior Contributor
Joined
Sep 3, 2003
Messages
249
Location
Bucharest
How do I programmatically check a checkbox in a datagridview? The true value of the column "chk2" is set to "yes" and the false to "no"

datagridview1("chk2", row_number).Value = "yes"

doesn't work
 
I don't have my compiler on this computer, but I usually use something like this:

Visual Basic:
DatagridView.DataTable.Rows(row_Num).Column("chk").Value = "yes"

Like I said I haven't got a compiler, I may have the syntax wrong, but that's the general idea.
 
Back
Top