example: procedure TForm1.DBGrid1DrawColumnCell(Sender: TObject; const Rect: TRect; DataCol: Integer; Column: TColumn; State: TGridDrawState); begin with TMyDBGrid(Sender) do begin if DataLink.ActiveRecord=Row-1 then begin Canvas.Font.Color:=clWhite; Canvas.Brush.Color:=$00800040; end else begin Canvas.Brush.Color:=Color; Canvas.Font.Color:=Font.Color; end; DefaultDrawColumnCell(Rect,DataCol,Column,State); end; end;
procedure TForm1.DBGrid1DrawColumnCell(Sender: TObject; const Rect: TRect;
DataCol: Integer; Column: TColumn; State: TGridDrawState);
begin
with TMyDBGrid(Sender) do
begin
if DataLink.ActiveRecord=Row-1 then
begin
Canvas.Font.Color:=clWhite;
Canvas.Brush.Color:=$00800040;
end
else
begin
Canvas.Brush.Color:=Color;
Canvas.Font.Color:=Font.Color;
end;
DefaultDrawColumnCell(Rect,DataCol,Column,State);
end;
end;