If Query1.fieldbyname('qrzt').AsString='报废' then Begin Dbgrid1.Canvas.Brush.Color :=clred;//设置背景颜色 Dbgrid1.Canvas.Font.Color:=clwindow;//设置字体颜色 Dbgrid1.DefaultDrawColumnCell( Rect, DataCol, Column,[gdFixed,gdFocused,gdSelected] ); End ;
----------------------------------------------
-