Dim column As DataGridViewTextBoxColumn
Me.gdv_detail_list.DataSource = Nothing
Me.gdv_detail_list.Columns.Clear()
column = New DataGridViewTextBoxColumn()
column.HeaderText = “Data Column”
column.DataPropertyName = “data_column”
column.AutoSizeMode = DataGridViewAutoSizeColumnMode.AllCells
Me.gdv_detail_list.Columns.Add(column)
column = New DataGridViewTextBoxColumn()
column.HeaderText = “Data Value”
column.DataPropertyName = “data_value_before”
column.AutoSizeMode = DataGridViewAutoSizeColumnMode.AllCells
Me.gdv_detail_list.Columns.Add(column)
Dim tmpDS As New DataSet
tmpDS.Tables.Add(New DataTable())
tmpDS.Tables(0).Columns.Add(“data_column”, GetType(String))
tmpDS.Tables(0).Columns.Add(“data_value_before”, GetType(String))
tmpDS.AcceptChanges()
Dim new_row As DataRow = tmpDS.Tables(0).NewRow
new_row(“data_column”) = “ABC”
new_row(“data_value_before”) = “DEF”
tmpDS.Tables(0).Rows.Add(new_row)
tmpDS.AcceptChanges()
Me.gdv_detail_list.DataSource = tmpDS.Tables(0)