Skip to Content

How to add images to a dynamically sized grid table?

I'm currently building a table based off this post's best answer: https://answers.sap.com/questions/345848/populate-grid-table-sapui5-dynamically.html.

Right now I want to display photos in the table instead of numbers. I've tried doing this by setting item to "project/webapp/img/exampleImage.png". However, that just leads to me displaying the string, "/sideProject/webapp/img/cat.jpg" in all of the grids instead of the image. How do I get this image displayed?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Dec 19, 2018 at 08:27 PM

    Hi Betty,

    I am not sure what control you are using as the column to show the image.. maybe that's the reason why @Jun Wu asked you to share the code..

    Usually we use image control to display the images in columns for responsive table.. But you are using the UI.table(grid table) I believe, so check out the list of controls that you can use inside the column below as not all controls will be supported inside the column.

    https://ui5.sap.com/#/api/sap.ui.table.Column/summary/Summary

    BR,

    Mahesh

    Add comment
    10|10000 characters needed characters exceeded

  • Dec 19, 2018 at 04:14 AM

    code please

    Add comment
    10|10000 characters needed characters exceeded