Código
procedure TForm1.DBGrid1DrawColumnCell(Sender: TObject; const
Rect: TRect;
DataCol: Integer;
Column: TColumn;
State: TGridDrawState);
begin
if (Column.Field.FieldName = 'NOMEDOCAMPO') then
begin
if condição then // coloque aqui sua condição
begin
DBGrid1.Canvas.Brush.Color:= clAqua;
DBGrid1.Canvas.Font.Color:= clWindowText;
DBGrid1.Canvas.FillRect(Rect);
DBGrid1.DefaultDrawColumnCell(Rect, DataCol, Column, State);
end;
end;
end;
Planeta Delphi - www.planetadelphi.com.br - Todos os direitos reservados | Copyright 2001-2009