Render image instead of data

Render image instead of data

jezamejezame Posts: 3Questions: 2Answers: 0

I want to render an image (a country flag) for a country column but keep the underlying data intact so that the column is still sortable. For example if the data is GB I want to display <img src="GB.gif">
I feel that I should be able to do this but I can't get it to work as I want.

Answers

  • colincolin Posts: 15,238Questions: 1Answers: 2,599
    edited March 2018

    Hi jezame,

    Yep, you can do that with a columns.render - there's an example on that page that turns the column into an URL, you can do something similar and create the HTML for the images.

    Cheers,

    Colin

This discussion has been closed.