Data in "defaultContent" of "columnDefs"
Data in "defaultContent" of "columnDefs"

Here is my problem: i want to have "idCandidate" (var) in my "defaultContent" at
href="editCandidate/{idCandidate}
Is there solution for this
"columnDefs": [
{"targets": 0, "data": "idCandidate", "width": "8%"},
{"targets": 1, "data": "name", "width": "20%"},
{"targets": 2, "data": "email", "width": "22%"},
{"targets": 3, "data": "phone", "width": "13%"},
{"targets": 4, "data": "universityName","width": "17%"},
{"targets": 5, "data": "skill", "width": "15%"},
{"targets": 6, "data": null, "width": "5%", "defaultContent": '<a href="editCandidate/"><i class="fas fa-fw fa-info-circle"></i></a>'}
Thanks
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
You will need to use
columns.render
. There are some examples in the doc that should help.Kevin
Thanks for helping Kevin
It's worked