Alex Feinman posted code on how to sort a DataGrid in C# for the .NET Compact Framework a while ago on the newsgroups. The only improvement I needed to make was to support TableStyles. One line of code later I had the following;
using
public
private void dgDataGrid_MouseUp(object sender, System.Windows.Forms.MouseEventArgs e){ if(dgDataGrid.VisibleRowCount == 0) return; SortDataGrid(sender, e); dgDataGrid.Select(dgDataGrid.CurrentRowIndex);}