procedure Tfm1.DBGrid1DrawDataCell(Sender: TObject; const Rect: TRect; Field: TField; State: TGridDrawState);begin with TDBGrid(Sender) do begin if dbgrid1.DataSource.DataSet.FieldByName('字段名').AsString='-1' then Canvas.TextOut(Rect.Left+4,Rect.Top+2,'****') else if dbgrid1.DataSource.DataSet.FieldByName('字段名').AsString='-2' then Canvas.TextOut(Rect.Left+4,Rect.Top+2,'###') end;end;