The child lists are only know while the parent node is expanded. So, you would have to dynamically sort the ChildList as the node is expanded. And when your user clicks on a child column header, you would have to go through all grid rows, sorting any childtable that is visible.
Here is code that sorts a column named "Name" when a row is expanded.
private void gridDataBoundGrid1_RowExpanded(object sender, GridRowEventArgs e)
{
GridBoundRecordState rs = this.gridDataBoundGrid1.Binder.GetRecordStateAtRowIndex(e.RowIndex);
DataView dv = rs.ChildList as DataView;
if(dv != null)
{
dv.Sort = "Name";
this.gridDataBoundGrid1.RefreshRange(GridRangeInfo.Rows(e.RowIndex + 1, e.RowIndex + rs.ChildCount));
}
}
So, on a cellclick, you would have to check to see if it was on one of your child headers, and if so, set a paramater (to play the role of "Name") in the above code so that when nodes are opened in the future, you would sort that column. You would also want to loop through all the rows in your grid, getting each GridBoundRecodState for each row, and use the same code as above to sort any child tables already opened.