procedure TForm1.DBGrid1DrawColumnCell(Sender: TObject; const Rect: TRect;
DataCol: Integer; Column: TColumn; State: TGridDrawState);
begin
if (gdfocused in state) or (gdSelected in state) then
begin
tDBGrid(Sender).canvas.font.color:=clRed;
tDBGrid(Sender).canvas.brush.color:=clYellow;
end;
tDBGrid(Sender).DefaultDrawColumnCell(Rect,DataCol,Column,State);
end;