需要在datagrid的OnCustomDrawCell事件中写代码
procedure TRSDTLBFORMDOC.DataGridCustomDrawCell(Sender: TObject; ACanvas: TCanvas; ARect: TRect; ANode: TTreeListNode; AColumn: TTreeListColumn; ASelected, AFocused, ANewItemRow: Boolean; var AText: string; var AColor: Integer; AFont: TFont; var AAlignment: TAlignment; var ADone: Boolean);
begin
if not (ASelected or AFocused) and ((ANode.Index mod 2) = 1) then
AColor := $EAEAEA;
end;