Я делал вот так
Код:
procedure TForm1.DBGrid1DrawColumnCell(Sender: TObject; const Rect: TRect;
DataCol: Integer; Column: TColumn; State: TGridDrawState);
begin
if (Table2.FieldByName('.').Value = 'X') then
begin
with DBGrid1.Canvas do
begin
Brush.Color := clYellow;
Font.Color := clBlack;
FillRect(Rect);
if (Column.Alignment = taRightJustify) then
TextOut(Rect.Right - 2 - TextWidth(Column.Field.Text), Rect.Top + 2,
Column.Field.Text)
else
TextOut(Rect.Left + 10, Rect.Top + 2, Column.Field.Text);
end;
end;
end;
только тут закрашивается строка в таблице