How can we create a link in a data table which is generated from a HTML sourced data?

How can we create a link in a data table which is generated from a HTML sourced data?

gopuvenkatgopuvenkat Posts: 1Questions: 1Answers: 0

The table looks like this

<table id="example" class="display" style="width:100%">
    <thead>
        <tr>
        <th>Name</th>
        <th>Id</th>
        </tr>
    </thead>
    <tbody>
        <tr>
        <th> Name1 </th>
        <th> ID1 </th>
        </tr>
    </tbody>
    </table>

I would like to add a link in each cell corresponding to the Name column. How will I do it?

This question has an accepted answers - jump to answer

Answers

  • colincolin Posts: 875Questions: 0Answers: 168
    edited May 16 Answer ✓

    Hi @gopuvenkat ,

    I'm sorry, I don't understand by a "link in each cell corresponding to the Name column" - how would this look in the table? If you want to change the look of a column's data, then you can use columns.render - there's examples there on that page on how to do that.

    One thing, the cells under <tbody> should be <td>, not `<th>'.

    Cheers,

    Colin

Sign In or Register to comment.