procedure TForm1.DBGrid1DrawColumnCell(Sender: TObject; const Rect: TRect; DataCol: Integer; Column: TColumn; State: TGridDrawState); begin with dbgrid1 do begin if (datasource.DataSet.RecNo mod 2)<>0 then canvas.Brush.Color:=clwhite else canvas.Brush.Color:=clYellow; DefaultDrawColumnCell(Rect,DataCol,Column,State); end; end;
DataCol: Integer; Column: TColumn; State: TGridDrawState);
begin
with dbgrid1 do
begin
if (datasource.DataSet.RecNo mod 2)<>0 then
canvas.Brush.Color:=clwhite
else
canvas.Brush.Color:=clYellow;
DefaultDrawColumnCell(Rect,DataCol,Column,State);
end;
end;