Data in "defaultContent" of "columnDefs"

Data in "defaultContent" of "columnDefs"

MintAcesMintAces Posts: 7Questions: 3Answers: 0
edited August 12 in Free community support

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

Answers

  • kthorngrenkthorngren Posts: 6,100Questions: 21Answers: 1,352
    Answer ✓

    You will need to use columns.render. There are some examples in the doc that should help.

    Kevin

  • MintAcesMintAces Posts: 7Questions: 3Answers: 0

    Thanks for helping Kevin
    It's worked :smiley:

Sign In or Register to comment.