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'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?VB Code:
[B]Dim tableStyle As DataGRidTableStyle = New DataGridTableStyle[/B] [B]Dim colStyle As DataGridTextBoxColumn[/B] daClass.Fill(ds, "Classes") daHull.Fill(ds, "Hulls") ds.Relations.Add("ClassRel", _ ds.Tables("Classes").Columns("classId"), _ ds.Tables("Hulls").Columns("classId")) Me.dgHulls.SetBindings(ds,Classes.ClassRel") tableStyle.MappingName = "Classes.ClassRel" Me.dgHulls.TableStyles.Add(tableStyle) colStyle = tableStyle.GridColumnStyles.Item("classId") colStyle.Width = 0




Reply With Quote