I just did a recent thread to fill a DataGridViewCheckBoxColumn from a SQL bit by replacing the column by index then pointing it to the same DataPropertyName:
Here is the code:
However, the checkbox column is now populated with a column of black solid filled boxes. I'm not sure what is causing this?
Here is the code:
VB.NET Code:
'after the DataGridView datasource is set: Dim FlyIndex As Integer = DataGridView2.Columns.Item("FLY").Index DataGridView2.Columns.RemoveAt(FlyIndex) Dim PFC As New DataGridViewCheckBoxColumn PFC.HeaderText = "FLY" PFC.Name = "FLY" PFC.DataPropertyName = "FLY" PFC.ThreeState = True DataGridView2.Columns.Insert(FlyIndex, PFC)
However, the checkbox column is now populated with a column of black solid filled boxes. I'm not sure what is causing this?