VB.net check a check box in a DataGridView

Murray Brown
Murray Brown used Ask the Experts™
on
Hi

What code do I use to check a CheckBox column cell in a DataGridView in VB.net
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
dataGridView1.Rows[1].Cells[3].Value = true;
Commented:
Values of checkboxes are boolean, so simply set a boolean value, True for checked and False for un-checked
CType(Datagridview1.Item(0, 2), DataGridViewCheckBoxCell).Value = True

Open in new window

Murray BrownASP.net/VBA/VSTO Developer

Author

Commented:
thanks for the help

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial