Ajax DataGrid Support Product Page


How do you display an image?

Asked 08 Feb 2013 21:52:42
has this question
08 Feb 2013 21:52:42 Steve Skinner posted:
I've got my datagrid working, but one of the fields in the layout is a URL of an image. In the datagrid output, how do I get that field to display as an image instead of just the URL that is stored in the database field?


Replied 11 Feb 2013 15:48:39
11 Feb 2013 15:48:39 Vulcho Vulev replied:
Hello Steve.

If you want to display the photos in your database as images rather then a text that list the path, to do this you need to select the "images" column(The field that contains the photos in your database) and enter <img src=“images/photo/(the path to your images folder containing the images in the recordset) in the Content Before field. You need enter “ width=“80/>(Where 80 represents the width of the images in the field) in the Content After. The images tag together with the path to the images will make sure the images will be displayed while the width specifies the width of the images.

Replied 11 Feb 2013 17:32:25
11 Feb 2013 17:32:25 Steve Skinner replied:
Thanks! I didn't realize that's what the before and after fields were for.

Worked perfectly.

Reply to this topic