Ver Mensaje Individual
  #4  
Antiguo 07-08-2007
redimido redimido is offline
Miembro
 
Registrado: jul 2007
Posts: 14
Reputación: 0
redimido Va por buen camino
Question Asunto

Pués lo he hecho y nada.
Me gustaría saber si es que este bloque (DBGrid1.DefaultDrawColumnCell(rect,DataCol,Column,State)
no permite la ejecución debido a que estoy trabando con campos tipos String.

Código Delphi [-]
TForm1.DBGrid1DrawColumnCell(Sender: TObject; const Rect:TRect;
DataCol: Integer; Column: TColumn; State: TGridDrawState);
begin
if table1estatus := 'finalizado' then
begin
DBGrid1.canvas.brush.color :=clBlue;
end else
DBGrid1.canvas.brush.color :=clRed;
DBGrid1.DefaultDrawColumnCell(rect,DataCol,Column,State) 
End;
End;
End;


La otra forma:


Código Delphi [-]
TForm1.DBGrid1DrawColumnCell(Sender: TObject; const Rect:TRect;
DataCol: Integer; Column: TColumn; State: TGridDrawState);
begin
if table1estatus := 'finalizado' then
begin
DBGrid1.canvas.brush.color :=clBlue;
end else
if table1estatus := 'pendiente' then
begin
DBGrid1.canvas.brush.color :=clRed;
DBGrid1.DefaultDrawColumnCell(rect,DataCol,Column,State) 
End;
End;
End;
Responder Con Cita