if (TCustomADODataSet(ADOQuery1).Recno mod 2)=0 then //记录号是双数
begin
(sender as TDBGrid).Canvas.Font.Color:=clBlack;
(sender as TDBGrid).Canvas.Brush.color:=$00F0E8D9
end
else
begin
(sender as TDBGrid).Canvas.Font.Color:=clBlack;
(sender as TDBGrid).Canvas.Brush.color:=clWindow
end;
(sender as TDBGrid).DefaultDrawColumnCell(Rect,DataCol,Column,State);