TDBAdvGrid AutoSizeRows with Picture Fields?


I have a blob field containing a JPEG.   Each JPEG is either 250 x 188 or 188 x 250.   I set the Column.PictureField := TRUE;  Column.Width := 250; Column.StretchMode := TStretchMode.ShrinkWithAspectRatio.

I then try the DBAdvGrid1.AutoSizeRows(FALSE) - but only the first row actually gets sized - as shown:

How can I get all the rows to look like the first please?


When you set Column.PictureStretch := TStretchMode.ShrinkWithAspectRatio, this means that when adding the picture to the cell, the picture will be added with shrinking taking aspect ratio in account. It is this instruction that causes that the picture size adapts to the then existing row height. If you want that the row height adapts to the picture height, please set Column.PictureStretch := TStretchMode.noStretch.