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.