I use bool column in my datagrid. but I get all grayed checks when I first load it. I know it is about the DBNULL state, but i have set Col.AllowNull = False. my column data type is tinyint, 1 or 0. So after I get these value, i convert it to true or false.Anyway, i have tried all the way i can think about, it still not work. can you help? thanks.

I post my code here.

VB Code:
  1. Private Sub frmModComps_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
  2.         conString = "....."
  3.  
  4.         daModComps = New OdbcDataAdapter("....." ,conString)
  5.         daModComps.Fill(ds, "table")
  6.  
  7.  
  8.         CustimizeDataGrid()
  9.  
  10.         Dim i As Integer
  11.         With dsModComps.Tables(0)
  12.             For i = 0 To .Rows.Count - 1
  13.                 If .Rows(i)("active") = 1 Then
  14.                     .Rows(i)("active") = Convert.ToBoolean(.Rows(i)("active"))
  15.                 ElseIf .Rows(i)("active") = 0 Then                  
  16.                     .Rows(i)("active") = Convert.ToBoolean(.Rows(i)("active"))
  17.                 End If
  18.                 Console.WriteLine(Convert.ToBoolean(.Rows(i)("active")))
  19.             Next
  20.         End With
  21.         grdModComps.DataSource = dsModComps.Tables(0)
  22.     End Sub
  23.  
  24. Private Sub CustimizeDataGrid()
  25.         Dim dgts As DataGridTableStyle = New DataGridTableStyle()
  26.         dgts.MappingName = "table"
  27.         grid.TableStyles.Clear()
  28.  
  29.         '1. Add a first column style
  30.         Dim desCol As New DataGridTextBoxColumn()
  31.         desCol.MappingName = "Description"
  32.         desCol.HeaderText = "Type"
  33.         desCol.Alignment = HorizontalAlignment.Center
  34.         desCol.ReadOnly = True
  35.         dgts.GridColumnStyles.Add(desCol)
  36.  
  37.         '2. Add a second column style.
  38.         Dim activeCol As New DataGridBoolColumn()
  39.         activeCol.MappingName = "Active"
  40.         activeCol.HeaderText = "Active"
  41.         activeCol.AllowNull = False
  42.         activeCol.Alignment = HorizontalAlignment.Center
  43.         dgts.GridColumnStyles.Add(activeCol)
  44.  
  45.         '3. Add a third column style.
  46.         Dim weightCol As New DataGridTextBoxColumn()
  47.         weightCol.MappingName = "Weight"
  48.         weightCol.HeaderText = "Weight"
  49.         weightCol.Alignment = HorizontalAlignment.Center
  50.         dgts.GridColumnStyles.Add(weightCol)
  51.  
  52.  
  53.         ' 4. set column width
  54.        dgts.GridColumnStyles(0).Width = 150
  55.        dgts.GridColumnStyles(1).Width = 100
  56.        dgts.GridColumnStyles(2).Width = 87
  57.  
  58.        dgts.DataGrid.Refresh()
  59.        grd.TableStyles.Clear()
  60.        grd.TableStyles.Add(dgts)
  61.  End Sub