Ver Mensaje Individual
  #2  
Antiguo 29-05-2003
FRANKER FRANKER is offline
Miembro
 
Registrado: may 2003
Ubicación: Elche
Posts: 71
Reputación: 22
FRANKER Va por buen camino
Lightbulb

Prueba a poner este código en el onDrawColumnCell del DBGrid:

Código:
procedure TFmRecaudacion.DBGrid1DrawColumnCell(Sender: TObject;
  const Rect: TRect; DataCol: Integer; Column: TColumn;
  State: TGridDrawState);
begin

  //***** Dibuja una linea de cada color *****//
  if Column.Field.DataSet.RecNo mod 2 = 0 then
    dbgrid1.canvas.brush.color := clAqua
  else
    dbgrid1.canvas.brush.color := clMenu;


     dbgrid1.DefaultDrawColumnCell(rect,DataCol,Column,State)
end;
Lo que hace el Código es preguntar al dataset si el registro es par, y si es le asigna un color (clAqua) sino Pues le pone el Otro.

Saludos y Suerte!!.
__________________
.:.::FRANKER::.:.
Responder Con Cita