Invalid DBAdvGrid RowHeights value

I am updating an application from Delphi Xe7 to Delphi 12 Athens. In XE7 the application the error does not show at run time. However, if I run the same application in Delphi 12 Athens I get a runtime error complaining Invalid Property error. Error reading an DBAdvGrid.RowHeights Invalid Property value.

I have tried recreating the grid and I checked the dfm text to see if there was some strange character written. I can't see what could be causing the issue. The error occurs when the form is created.

Could some shed some light on a solution.

Regards
Tom Dalton

Try to open the DFM file with a text editor like Notepad and remove the RowHeights property part from the DFM

Hi Bruno

Thanks I deleted the row Heights entry and it is now working correctly. I had this issue years ago. I had forgotten.

Regards
Tom Dalton

Hi Bruno,

The problem persists, I can remove the row Heights from the DFM, and save the file; but it returns as soon as I change back to the form view and produces the same error at runtime! It is a bit frustrating. Is there something that I am missing?

Regards
Tom Dalton

It's most likely due to a specific combination of grid settings. In order to be able to investigate this, we would really need more details.

Hi Bruno,

The form may need to be rebuilt from scratch. I have checked all the setting I think may have an effect. But I can't see anything that is glaringly wrong. Is there option that does affect the RowHeights parameter or would cause the error? I have tried a number of options. None seem to work. I tried to send the pas and dfm files to you but the dfm file is 11Mb! I could share the files on One Drive if needed. Would that assist or could we schedule a AnyDesk session (or similar). So, that you can take a look.

Regards
Tom Dalton

The typical pattern is that something changes row heights at design-time and these changes need to be persisted in the DFM file.
Try to keep DBAdvGrid.DefaultRowHeight to default value 22 (set it in code if you need to change it) and when possible, also leave DBAdvGrid.RowCount at its default value 2 at design-time.