procedure TForm1.DBGridEh1DrawDataCell(Sender: TObject; const Rect: TRect;
Field: TField; State: TGridDrawState);
begin
if not (gdFixed in State) then
begin
with DBGridEh1.Canvas do
begin
//Please use TADOTable
//if you use TTable, I cann't make sure you will pass.
if (ADOTable1.RecNo mod 2)=0 then
Brush.Color := clGreen
else
Brush.Color:=clWhite;
FillRect(Rect);
Font.Color:=clblack;
TextOut(Rect.Left, Rect.Top, Field.AsString);
end;
end;
end;