AutoSizeRow(s) on merged cells


I'm using TAdvStringGrid to show a list of items with some properties an a description. As the description often won't fit in a single line, but should be shown completely, I use AutoSizeRows. Some of these items have identical descriptions, so to save space, I wanted to use MergeColumnCells on this column. It works fine, but if the description does not fit in the vertical space that the non-merged columns use, it is simply cut off, i.e. AutoSizeRows ignores the merged cell (even called after the merge). Did I miss something or is this simply a bug? Is there a way to work around that?

(Observed this in VCL Component Pack 8.4.x, but the current does the same.)

TIA and regards,

When rows are vertically merged, AutoSizeRows() has no effect on such vertically merged cells as there is no strict definition where the height should be increased. The first row? All rows? The last? Other?

Ok, that's true. Logically, I would be ok if it would be the first row (because the merge cell is accessed with this row index), but increasing all the affected rows would would probably give the best visual results, so I would go for that (not sure how it would look when having overlapping merge regions in differents columns, but as long as the text of all merged cells is shown, I wouldn't care that much).

Your answer sounds like it this is intended behavior and there's no way to have this done automatically. So I guess I would have to do it manually, i.e. look for merged cells, get text height and increase row height(s) if necessary, on every size/content change, right?

Yes, it is intended this way. The situation further complicates when you have vertical merged cells in one column and at the same time vertically merged cells in another column but having different rows in common. What is the best strategy then for auto sizing?  As you can understand, it is hard to define a best and expected behavior. Therefore, right now we skip vertically merged cells in the auto sizing.