How to make a column with links?

How to make a column with links?

DunkanMaklautDunkanMaklaut Posts: 12Questions: 7Answers: 0

Hello!
is it possible to make all records in a column links of the type <a href ='<c:url value="/edit?id=$ {employee.id>"/> '> so that the id displayed in this column are links?

This question has an accepted answers - jump to answer

Answers

  • DunkanMaklautDunkanMaklaut Posts: 12Questions: 7Answers: 0
    edited September 2020

    (deleted)

  • DunkanMaklautDunkanMaklaut Posts: 12Questions: 7Answers: 0

    i did it with:
    columns:[
    {
    data: 'id',
    "render": function (data, type,row, meta) {
    return '<a href="'+document.location.host+'/WebBD/edit?id='+data+'">'+data+'</a>'
    }
    }
    but the links do not open, they can only be opened if you click "open in a new window"

  • colincolin Posts: 15,118Questions: 1Answers: 2,583
    Answer ✓

    That looks correct. We're happy to take a look, but as per the forum rules, please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.

    Cheers,

    Colin

This discussion has been closed.