VBobCat
Well-known member
I used this code:
Nevertheless, mycontrol remains empty after this.
Could someone help me figure out why?
Thank you very much!
Friend Sub PopulateCB(ByRef mycontrol As ComboBox, _ ByVal expressionSQL As String) ' DMBD is my data-handling class: Using DataTableOrigem As DataTable = DMBD.Read_a_Table(expressionSQL) ' this MsgBox told me my Table is correctly filled: MsgBox(DataTableOrigem.Rows(0).Item(0).ToString) ' this MsgBox told me my control was correctly passed: MsgBox(mycontrol.Name) mycontrol.DataSource = DataTableOrigem mycontrol.ValueMember = DataTableOrigem.Columns(0).ColumnName mycontrol.DisplayMember = DataTableOrigem.Columns(1).ColumnName End Using End Sub
Nevertheless, mycontrol remains empty after this.
Could someone help me figure out why?
Thank you very much!