To remove a column from a DataTable you can use the code
Private Sub RemoveColumnByName(colName As String)
Dim cols As DataColumnCollection
' Get the DataColumnCollection from a DataTable in a DataSet.
cols = DataSet1.Tables("Orders").Columns
If cols.Contains(colName) Then
If cols.CanRemove(cols(colName)) Then cols.Remove(colName)
End If
End Sub
To add a column to a DataTable you can use the code
Private Sub AddColumn()
Dim cols As DataColumnCollection
Dim myCol As DataColumn
' Get the DataColumnCollection of a table in a DataSet.
cols = DataSet1.Tables("Orders").Columns
' Add a new column and return it.
myCol = cols.Add("Total",System.Type.GetType("System.Decim al"), _
"Price + Tax")
myCol.ReadOnly = True
myCol.Unique = False
End Sub
