After looking at few more examples I've changed my code but now I get a different error (blue squiggle line): Option Strict On disallows implicit conversions from 'System.Windows.Forms.DataGridColumnStyle' to 'System.Windows.Forms.DataGridTextBoxColumn'
VB Code:
  1. [B]Dim tableStyle As DataGRidTableStyle = New DataGridTableStyle[/B]
  2. [B]Dim colStyle As DataGridTextBoxColumn[/B]
  3.  
  4. daClass.Fill(ds, "Classes")
  5. daHull.Fill(ds, "Hulls")
  6. ds.Relations.Add("ClassRel", _
  7.                         ds.Tables("Classes").Columns("classId"), _
  8.                         ds.Tables("Hulls").Columns("classId"))
  9. Me.dgHulls.SetBindings(ds,Classes.ClassRel")
  10. tableStyle.MappingName = "Classes.ClassRel"
  11. Me.dgHulls.TableStyles.Add(tableStyle)
  12. colStyle = tableStyle.GridColumnStyles.Item("classId")
  13. colStyle.Width = 0
I can turn off Option Strict and the blue line goes away but then I get the same error in my previous post. What am I missing?