Quantcast
Channel: VBForums
Viewing all articles
Browse latest Browse all 15947

DataGridViewCheckBoxColumn solid filled black boxes

$
0
0
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:

VB.NET Code:
  1. 'after the DataGridView datasource is set:
  2.      
  3.             Dim FlyIndex As Integer = DataGridView2.Columns.Item("FLY").Index
  4.             DataGridView2.Columns.RemoveAt(FlyIndex)
  5.      
  6.             Dim PFC As New DataGridViewCheckBoxColumn
  7.             PFC.HeaderText = "FLY"
  8.             PFC.Name = "FLY"
  9.             PFC.DataPropertyName = "FLY"
  10.             PFC.ThreeState = True
  11.             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?

Viewing all articles
Browse latest Browse all 15947

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>