I have a DataGridView that I'm trying to populate using a For loop:
Dim serverName As String = SQLServerName + "\" + Instance
Dim server As Server = New Server(serverName)
Dim Datatable1 As New DataTable
For Each database As Database In server.Databases
Dim row As DataRow = Datatable1.NewRow
row("Database") = database.Name
row("Version") = DBVersionCheck(serverName, database.Name)
row("Status") = My.Resources.My_Image
Datatable1.Rows.Add(row)
Next
DataGridView1.DataSource = Datatable1
The DGV has been designed with the designer (columns, layout etc). Using the above the DGV does not populate. I was using a ListView for this but I need images in a subitem so have switched to using a DGV. Any advice?