Attached I leave you the test application, with custom code.
Finally got hold of the code.
Thank you all and hopefully this is an instructive contribution for non-professional progrtammeurs.
// Draw line below header
YPos := YPos + HeaderHeight;
Page.DrawLine(15, YPos, 30 + (StringGrid1.ColCount - 1) * 20, YPos, LineThickness);