Ver Mensaje Individual
  #16  
Antiguo 05-09-2007
zugazua2001 zugazua2001 is offline
Miembro
 
Registrado: oct 2004
Ubicación: Necochea
Posts: 237
Reputación: 22
zugazua2001 Va por buen camino
Aca te paso el codigo

Código Delphi [-]
procedure tdata.DBGrid1DrawColumnCell(Sender: TObject; const Rect: TRect;DataCol: Integer; Column: TColumn; State: TGridDrawState);
begin
inherited;
if query1.Field[No].AsString[1] ='R' then
begin
DBGrid1.Canvas.Font.Color:=clBLACK;
dbgrid1.Canvas.Brush.Color:=clblue;
end
ELSE
BEGIN
if query1.Field[No].AsString[1] ='O' then
BEGIN
DBGRID1.Canvas.Font.Color:=CLWHITE;
DBGRID1.Canvas.Brush.Color:=CLgreen
END
END;
DBGrid1.DefaultDrawColumnCell
(Rect, DataCol, Column, State);
end;


Me tira error en el query1, el campo No no se que es.
Supongo que esos son los dos puntos que estan mal.
Muchas gracias por todo.
Responder Con Cita