Jump to content

Grid with Pictures


Helmut Hort

Recommended Posts

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

  • Upvote 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...