public static Grid CreateComplexGrid(BcsComplexNode complex)
{
var grid = new Grid();
int componentRowIndex = 0;
if(complex.Components.Count > 1)
{
AddRowControlToGrid(grid, new Label { Content = "Complex:" });
AddEmptyRow(grid);
componentRowIndex = 1;
}
foreach (var component in complex.Components)
{
AddColumnControlToGrid(grid, CreateEntityGrid(component), componentRowIndex);
}
return grid;
}