procedure TSuppliersListForm.cxGrid1DBTableView1Column1GetDataText( Sender: TcxCustomGridTableItem; ARecordIndex: Integer; var AText: String); var sid:string; begin if varToStr(Sender.GridView.ViewData.Records[ARecordIndex].Values[10])<>'' then begin sid := Sender.GridView.ViewData.Records[ARecordIndex].Values[10]; MyQuery.SQL.Clear; MyQuery.SQL.Add('select * from part where id in('+sid+')'); MyQuery.Open; whilenot MyQuery.Eof do begin AText := VarToStr(MyQuery.FieldValues['cn_name']); MyQuery.Next; end; end; end;