TTMSFMXGrid - printing some cells borders only

Hi,
How can I print borders on some cells only. I can disable printing borders by this:
procedure TSupiskyGrid.GetCellLayout(Sender: TObject; ACol, ARow: Integer; ALayout: TTMSFMXGridCellLayout; ACellState: TCellState);
begin
if fPrinting then begin
ALayout.Stroke.Kind := TBrushKind.None;
ALayout.Sides := [];
end;
end;

But If I try print top line on aRow=1 (respectively bottom line on aRow=0), result is bad:
procedure TSupiskyGrid.GetCellLayout(Sender: TObject; ACol, ARow: Integer; ALayout: TTMSFMXGridCellLayout; ACellState: TCellState);
begin
if fPrinting then begin
if (ARow =0) then begin
ALayout.Stroke.Kind := TBrushKind.Solid;
ALayout.Sides := [TSide.Bottom];
end
else if (ARow =1) then begin
ALayout.Stroke.Kind := TBrushKind.Solid;
ALayout.Sides := [TSide.Top];
end
else begin
ALayout.Stroke.Kind := TBrushKind.None;
ALayout.Sides := [];
end
end;
end;

Thank You.

I figure it out:

procedure TSupiskyGrid.PrintBeforeDrawCell(Sender: TObject; APageIndex: Integer; ACanvas: TCanvas; ARect: TRectF; ACol, ARow: Integer; ACell: TFmxObject);
var p2:TPointF;
begin
if (ARow = 1) then
begin
p2.x:=ARect.BottomRight.x;
p2.Y:=ARect.TopLeft.y;
ACanvas.Stroke.Color := TAlphaColorRec.Black;
ACanvas.Stroke.Kind:= TBrushKind.solid;
ACanvas.DrawLine(ARect.TopLeft, p2, 1);
end;
end;

procedure TSupiskyGrid.GetCellLayout(Sender: TObject; ACol, ARow: Integer; ALayout: TTMSFMXGridCellLayout; ACellState: TCellState);
begin
if fPrinting then
ALayout.Stroke.Kind := TBrushKind.none;
end;