Ver Mensaje Individual
  #2  
Antiguo 31-01-2004
Gydba Gydba is offline
Miembro
 
Registrado: ene 2004
Ubicación: Argentina
Posts: 673
Reputación: 21
Gydba Va por buen camino
Fijate si este código te ayuda (Tenés que usar el evento DrawDataCell del componente):
Código:
procedure TForm1.DBGrid1DrawDataCell(Sender: TObject; const Rect: TRect; Field: TField; State: TGridDrawState);
var
   iRowNumber : Integer;
begin
   with (Sender as TDBGrid), Canvas do begin
      iRowNumber := (Rect.Top + Rect.Bottom) div ((1+Rect.Bottom - Rect.Top)*2);
         if Odd(iRowNumber) then Brush.Color := clYellow
         else Brush.Color := clWhite;
      FillRect(Rect);
      DefaultDrawDataCell(Rect, Field, State);
   end;
end;
Como dato interesante el componente rxDBGrid de las rxlib tiene propiedades un tanto mas avanzadas que el DBGrid.
__________________
Suerte
.: Gydba :.
Responder Con Cita