CurrencyManager cm = BindingContext[grid.DataSource, grid.DataMember] as CurrencyManager;
if (cm != null)
{
var defaultView = cm.List as DataView;
int pos = grid.Model.RowCount;
for (int i = 0; i < pos; i++)
{
GridBoundRecordState rs = grid.Binder.GetRecordStateAtRowIndex(i);
bool True = rs.HasChildList;
if (True)
{
var view = rs.ChildList as DataView;
if (view != null)
{
if (defaultView != null)
{
view.Sort = defaultView.Sort;
}
grid.RefreshRange(GridRangeInfo.Rows(i, i + rs.ChildCount));
i += rs.ChildCount;
}
}
}
}
Sorting solved ;), still looking for auto-collapsing work around.