How to make a column with links?

How to make a column with links?

DunkanMaklautDunkanMaklaut Posts: 11Questions: 6Answers: 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?

Answers

  • DunkanMaklautDunkanMaklaut Posts: 11Questions: 6Answers: 0
    edited September 10

    (deleted)

  • DunkanMaklautDunkanMaklaut Posts: 11Questions: 6Answers: 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: 9,780Questions: 0Answers: 1,619

    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

Sign In or Register to comment.