One Cell of a Grid contains another Grid, which seems to work fine on first glance.
Except for the Grid.AutoSizeRows function. It sets the row height of the outer Grid only to the height of the first col height of the inner Grid, but not to the complete Grid. So I see only the fixed col of the inner grid.
AutoSizeRows doesn't use the size of embedded controls as normally, the embedded control size is set to the size of the cell where it is inserted into. So, if you want the child grid to be larger, you'd need to programmatically adapt the height of the row with grid.RowHeights[rowindex]: integer;
The Child grid has the correct size, only the parent cell/row is too small (standard row height).
I call the AutoSizeRows(false) procedure in the OnCellsChanged Event. Then all cells that contain another grid are too small, cells with pictures or text are correct.
Of course I can do this manually by maintaining the references to the child grids and the information in which parent cells they are and then manually adapt the parent row heights after the procedure call AutoSizeRows(false).
But that doesn't seem like the intended solution. Or is it?
As the sub controls take on the cell size and are client-aligned, auto-sizing would need to determine if a control is a grid and then calculate all the cell widths/heights in order to make a cell that is large enough the fit in the grid. Unfortunately this is not implemented. We'll investigate if we can expose this through an event that retrieves the minimum width/height for a particular column/row during auto-sizing.