procedure TForm1.DBGrid1DrawColumnCell(Sender: TObject; const Rect: TRect; DataCol: Integer; Column: TColumn; State: TGridDrawState);
var i, wid: Integer;
begin
if thisisasubtitlerow then begin
DBGrid1.Canvas.Brush.Color := clLime;
wid := 3;
for i := 0 to DataCol - 1 do
wid := wid + DBGrid1.Columns[i].Width - 1;
DBGrid1.Canvas.TextRect(Rect, Rect.Left - wid, Rect.Top + 2, 'mysubtitle')
end else
DBGrid1.DefaultDrawColumnCell(Rect, DataCol, Column, State);
end;