here's my solution:
Code:
Public Class Factory
Public Property Name As String
Public Property Clients As New List(Of Client)
End Class
Code:
Public Class Client
Public Property Name As String
Public Property Location As Integer
Public Property Id As Integer
End Class
Code:
Public Class Form1
Dim Factories As New List(Of Factory)
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Factories.Add(New Factory With {.Name = "A"})
Factories.Last.Clients.Add(New Client With {.Name = "Client 1", .Id = 1, .Location = 101})
Factories.Last.Clients.Add(New Client With {.Name = "Client 2", .Id = 2, .Location = 111})
Factories.Add(New Factory With {.Name = "B"})
Factories.Last.Clients.Add(New Client With {.Name = "Client 3", .Id = 3, .Location = 121})
Factories.Last.Clients.Add(New Client With {.Name = "Client 4", .Id = 4, .Location = 131})
Dim datasource = (From f As Factory In Factories _
From c As Client In f.Clients
Select New With { _
.FactoryName = f.Name, _
.ClientName = c.Name, _
.ClientId = c.Id, _
.ClientLocation = c.Location}).ToArray
DataGridView1.DataSource = datasource
End Sub
End Class