How do I specify links in every returned row?
How do I specify links in every returned row?
mediocre
Posts: 1Questions: 1Answers: 0
Hello, I am a beginner in datatables and JQuery and I would like to display my row with a specific link. I have managed to return data as links, however my next problem is how do I specify the links in every returned row? Or is there a way? Thank you in advance.
The following are my code for fetching data from my database and displaying them:
$('#bidder-active-bids').DataTable({
data: responseObj,
responsive: true,
columns: [
{data: 'bid_notice_id'},
{data: 'Title',
render: function(data, type, row, meta) {
return '<a href = "the_specific_link">'+data+'</a>';
}},
{data: 'budget_contract'}
]
I hope I had made my question clear, please feel free to ask.
Answers
Are you wanting to build the links based on other data in the row? If so see this example of how to access the row data.
If this isn't what you are looking for please provide more details of how you want this to work. Where does the information for the specific row link come from?
Kevin