有哪位大侠知道啊!!我的代码是这样的。可是还是报错!!其中‘'Picexe'’字段是用来区分图片的类型!procedure TForm1.FormCreate(Sender: TObject);begin cxGrid1DBTableView1.GetColumnByFieldName('Phone').PropertiesClassName:='TcxImageProperties'; while not ADOQuery1.Eof do begin if ADOQuery1.fieldByName('Picexe').AsString='.JPG'then TcxImageProperties(cxGrid1DBTableView1.GetColumnByFieldName('Phone').Properties).GraphicClassName:='TJPEGImage'; if ADOQuery1.fieldByName('Picexe').AsString='.BMP'then TcxImageProperties(cxGrid1DBTableView1.GetColumnByFieldName('Phone').Properties).GraphicClassName:='TBitmap'; ADOQuery1.next; end;end;