procedure TScheResultFrm.dbgrdResultDrawColumnCell(Sender: TObject; const Rect: TRect; DataCol: Integer; Column: TColumn; State: TGridDrawState);begin //行斑马线效果 if (DsScheResultData.RecNo mod 2) = 0 then dbgrdResult.Canvas.Brush.Color:= TColor($FDF1F1) else dbgrdResult.Canvas.Brush.Color:= clWhite; if DsScheResultData.FieldByName('FCapacity').AsFloat = 1 then dbgrdResult.Canvas.Font.Color:= clRed; //选中行突出 if ((State = [gdSelected]) or (State=[gdSelected,gdFocused])) then begin dbgrdResult.Canvas.Brush.color:= clBtnFace; dbgrdResult.Canvas.Font.color:= clBlack; dbgrdResult.Canvas.Font.Style := [fsBold,fsitalic]; RzStatusPane.Caption:= '当前选中单据为 '+DsScheResultData.FieldByName('FBillno').AsString; end; if EditFlag then begin //模拟选中背景色 with TMyDBGrid(Sender) do begin if DataLink.ActiveRecord = Row-1 then begin Canvas.Brush.Color:= clBtnFace; Canvas.Font.color:= clBlack; Canvas.Font.Style := [fsBold,fsitalic]; end else begin if (DsScheResultData.RecNo mod 2) = 0 then dbgrdResult.Canvas.Brush.Color:= TColor($FDF1F1) else dbgrdResult.Canvas.Brush.Color:= clWhite; end; end; end; dbgrdResult.DefaultDrawColumnCell(Rect, DataCol, Column, State);end;~~~~~~~~~~~~~~~~~~~~~~~~~~~~给你一个Tdbgrid的,自己在分析一下吧!