Helmut Hort Posted July 4, 2011 Share Posted July 4, 2011 Hi Farshad, is it now or in the near future possible to place images into a (db)grid? Best regards Helmut Quote Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted July 4, 2011 Administrators Share Posted July 4, 2011 In current version you can do it by directly assigning html links to Grid cells. <img src="http://..." /> In future releases I will try to add support for images that are directly loaded from DataSet. Quote Link to comment Share on other sites More sharing options...
ldb68 Posted July 4, 2011 Share Posted July 4, 2011 You must use OnDrawColumnCell event to change field value to show an images. es. procedure TMainForm.UniDBGrid2DrawColumnCell(Sender: TObject; ACol, ARow: Integer; var Value: string; Column: TUniDBGridColumn; Attribs: TUniCellAttribs); begin if Column.FieldName= 'foto' then begin Value:= '<a href="/images/'+ Value + '" target="_blank">'+ 'open' +'</a>'; end else if Column.FieldName= 'preview' then begin Value:= '<img src="/images/preview.jpg">'; end end; value= image name Hi Farshad, is it now or in the near future possible to place images into a (db)grid? Best regards Helmut 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.