Hello,
There's probably an easier way to add a column to the grid dynamically but it gave me , a newbie, a lot of grief.
Adding a column dynamically to a grid that's associated with a datatable turned out to be relatively easy:
// Create the datatable column
newColumn = new DataColumn();
newColumn.ColumnName = <column name>;
newColumn.DataType = ..
....
<Datatable name>.Columns.Add(newColumn);
<Dataset name>.Tables[0].Columns[<column name>].SetOrdinal(<Position of the new column within the datatable>);
// Break and re-establish the link between the grid and the datatable.
<Grid name>.ItemsSource = null;
<Grid name>.ItemsSource = <Datatable name>;
// Load the new column with data by adding the data to the datatable
<datatable name>.Rows[<row index>][column index] = <data>;
<grid name>.Rebind;