Procedure TFrom1.DBGridEh1DrawColumnCell(Sender: TObject; Const Rect: TRect; DataCol: Integer; Column: TColumnEh; State: TGridDrawState);Begin If SameText(Column.DisplayName, ADODataSet1ckvalue.FieldName) Then //列名称 Begin If SameText(Trim(ADODataSet1ckvalue.Value), '合格') Then //合格时显示颜色:clLime; Begin DBGridEh1.Canvas.Brush.Color := clLime; End Else If SameText(Trim(ADODataSet1ckvalue.Value), '不合格') Then//不合格时显示颜色:clred; Begin DBGridEh1.Canvas.Brush.Color := clred; End; End; DBGridEh1.DefaultDrawColumnCell(Rect, DataCol, Column, State);End;//大致是这样的,自己修改下即可。