jeudi 16 septembre 2021

Programatically Setting DataGridView Cell Value to True Does Not Result in Checked CheckBox

I have CheckBoxes in Column 0 of a DataGridView(dgv1), and setting the value to True for cell(0,0) does not result in a checked box. Per this discussion (Check checkboxes in DataGridView programmatically), it works out that setting a cell value to true will highlight a cell, but it does not place a check in the CheckBox.

Either this:

dgv1.Rows(0).Cells(0).Value = True

or this

dgv1(0,0).Value = True

only results in a highlighted cell, but the CheckBox is not checked.

Any further suggestions?




Aucun commentaire:

Enregistrer un commentaire