I'm having an issue with my DataGrid being removed from the page on postbacks.
All of the columns are added programatically as the application requires user
selection to decide what columns of data to present. When a column is
selected for sorting from this grid, or when another control which
AutoPostBacks is used, the DataGrid is wiped away. How can I avoid this
when the columns are created dynamically? I'm not concerned with the
controls removing it, as this actually is convenient. The sorting is the
main issue, though I assume the problem is all tied together.

// A bit of code from bindGrid(string sortfield)
if (chkWM.Checked)
{
BoundColumn wm = new BoundColumn();
wm.HeaderText="WM";
wm.DataField="WM";
wm.SortExpression="WM";
wm.DataFormatString="{0:00}";
wm.HeaderStyle.ForeColor=Color.White;
wm.HeaderStyle.BackColor=Color.Black;
summaryGrid.Columns.Add(wm);
summaryString += " AND WM="+ddlWM.SelectedValue;
groupString += ", WM";
}

DataView Source = dataGridTable.DefaultView;
Source.Sort = sortfield;
summaryGrid.DataSource = Source;
summaryGrid.DataBind();
}//end bindGrid()

public void summaryGrid_Sort(object sender, DataGridSortCommandEventArgs e)
{
bindGrid(e.SortExpression);
DataView Source = dataGridTable.DefaultView;

Source.Sort = e.SortExpression;
if (asc.Checked)
Source.Sort = e.SortExpression + " ASC";
else
Source.Sort = e.SortExpression + " DESC";
summaryGrid.DataSource = Source;
summaryGrid.DataBind();
}//end summaryGrid_Sort()
Thanks - Steve