I have a DataGridView
which has no DataSource
associated, but it is filled manually.
With two columns:
-
Column 1:
seleccion
-
Column 2:
descripcion
.dgrid.Rows.Add(new object[] { true, "ADMINISTRACIÓN"}); dgrid.Rows.Add(new object[] { true, "DISTRIBUCIÓN"}); dgrid.Rows.Add(new object[] { true, "FINANZAS"});
Problem
I am using the property ColumnHeadersVisible
set in false
to hide the header of the columns, and when you want to mark / unmark the first box CheckBoxColumn
does not allow it, instead the other boxes if:
How can I solve it?
On the other hand, if I show the header of the columns ColumnHeadersVisible = true
, it does not present problems in the selection of the boxes.
Note: I need to hide the header because I will use this
DataGridView
in a very small space of the form.
Environment: Visual Studio 2010 (Windows Forms) C #