Duplicating StringGrid lazarus / 31-LCL ---------------------------------------------------------------------- asdf · 2011-02-05 12:31 Picture 1. & 1a = In small/test project, it worked well. ---------------------------------------------------- But in my real project, it had error message. Picture 2 = My real project. Picture 3 = The error message. In previous tabsheet, FixedAssetRegisterBodyStringGrid.FixedRows:=3; In this tabsheet, if I use DepreciationHeaderStringGrid.RowCount:= 4, it is ok. But if I used DepreciationHeaderStringGrid.RowCount:= FixedAssetRegisterBodyStringGrid.FixedRows +1; , it shows error message(Picture 3). ---------------------------------------------------------------------- Blaazen · 2011-02-05 12:45 I think it is clear. Error message tells you what to do. Simply swap two lines: StringGrid2.RowCount:=StringGrid1.RowCount; StringGrid2.FixedRows:=StringGrid1.FixedRows; because you must at first add rows and then decide how many of them  will be "header". ---------------------------------------------------------------------- asdf · 2011-02-05 13:59 OMG! Thank you so much Blaazen, it really worked .