I am not sure if there are better methods, but, as you know, the different levels of a UltraWinGrid are called Bands and a collection of this Bands is available in the DisplayLayout properties.
The idea is to enumerate the rows in the top level band and set the Expanded property to true after the setting of the DataSource only to the first row of this band.
// Returns a DataSet with two tables linked with a DataRelation
DataSet ds = GetDataSource;
grdMyData.DataSource = ds;
// Now loop on the rows of the first band
foreach (UltraGridRow row in grdMyData.DisplayLayout.Bands[0].GetRowEnumerator(GridRowType.DataRow))
{
// If the row has child rows, then set the its Expanded property
// to true and exits immediately the loop
if (row.HasChild())
{
row.Expanded = true;
break;
}
}