Try this
Create a structure
Public Structure MyData
Public Property id() As Integer
Get
Return m_id
End Get
Set(value As Integer)
m_id = value
End Set
End Property
Private m_id As Integer
Public Property title() As String
Get
Return m_title
End Get
Set(value As String)
m_title = value
End Set
End Property
Private m_title As String
End Structure
then in your button click event use the following
Dim col1 As New DataGridTextColumn()
Dim col2 As New DataGridTextColumn()
DataGrid1.Columns.Add(col1)
DataGrid1.Columns.Add(col2)
col1.Binding = New Binding("id")
col2.Binding = New Binding("title")
col1.Header = "ID"
col2.Header = "title"
DataGrid1.Items.Add(New MyData() With { _
.id = 1, _
.title = "Test"
})
its a rough bit of code but should help you move forward