diff --git a/lcl/grids.pas b/lcl/grids.pas index 7b24531ebe..e41b555279 100644 --- a/lcl/grids.pas +++ b/lcl/grids.pas @@ -8501,8 +8501,9 @@ begin if FTitleStyle<>tsNative then DrawColumnText(aCol,aRow,aRect,aState); - if (goFixedRowNumbering in Options) and (FixedCols >= 1) and (aCol = 0) then - DrawCellAutonumbering(aCol, aRow, aRect, IntToStr(aRow)); + if (goFixedRowNumbering in Options) and (FixedCols >= 1) and + (aCol = 0) and (aRow >= FixedRows) then + DrawCellAutonumbering(aCol, aRow, aRect, IntToStr(aRow-FixedRows+1)); end; { TCustomStringGrid }