procedure TForm1.DBGrid1DrawColumnCell(Sender: TObject;
const Rect: TRect; DataCol: Integer; Column: TColumn;
State: TGridDrawState);
begin
if {条件} then with TDBGrid(Sender) do
begin
Canvas.Brush.Color := clRed;
DefaultDrawColumnCell(Rect, DataCol, Column, State);
end;
end;