mardi 5 juillet 2016

weird behavior of checkbox column after setting a c# datagridview datasource to null

I have a c# datagridview checkbox column, which works fine, until i set the datasource to null. The grid collapses, BUT an extra checkbox column gets added immediately to the right of the original. If I click the reset button again, a third checkbox column pops up. The code below is standard for this type of column:

enter image description here

chk = new DataGridViewCheckBoxColumn();
dataGridView1.Columns.Add(chk);

The image shows the result of clicking Reset.




Aucun commentaire:

Enregistrer un commentaire