Лишь только пример обработки события OnDrawCell:
Код:
procedure TForm1.StringGrid1DrawCell(Sender: TObject; ACol, ARow: Integer;
Rect: TRect; State: TGridDrawState);
begin
with StringGrid1.Canvas do
begin
if (gdFixed in State) then Brush.Color := clBtnFace
else Brush.Color := clWindow;
Font.Color := clBlack;
FillRect(Rect);
TextOut(Rect.Left + 2, Rect.Top + 2, StringGrid1.Cells[ACol, ARow]);
if (ARow mod 3 = 0) then
begin
Pen.Width := 3;
Pen.Color := clRed;
MoveTo(0, Rect.Bottom);
LineTo(Rect.Right, Rect.Bottom);
end;
end;
end;
Свойство DefaultDrawing установить в False.