bug!? DBGRIG

I use the DBGRID and have a problem/bug? I have written an own procedure for autosize row. The procedure works fine without problems. But only at the visually view. If i scroll down, the rows haven't the right size. If I am at the end of the DBGRID and I start the procedure the rows have the right size...but if I scroll up...the  rows haven't the right size at the begin of the DBGRID. The Pagemodus ist true, and it is for us important.

Maybe there is a other way, that the row height have an maximal size. So we can see for example 3 lines of the text but not more? But if there only one line text, I want have a smaller row height.

Greets

 

Have you considered calling AutoSizeRows() from the dataset AfterScroll event?  As the grid only shows one page of records, the auto sizing would have to be performed each time new records are shown in the grid.