procedure TForm1.DBGrid1DrawColumnCell(Sender: TObject; const Rect: TRect;
DataCol: Integer; Column: TColumn; State: TGridDrawState);
begin
if Table1.RecNo mod 2 = 0 then
DBGrid1.Canvas.Brush.Color :=clInfoBk //单数行显示颜色
else
DBGrid1.Canvas.Brush.Color :=clGreen ; //单数行显示颜色
DBGrid1.DefaultDrawColumnCell(Rect,DataCol, Column,State);
end;