Add anchor table data

Add anchor table data

NicoNBNicoNB Posts: 2Questions: 0Answers: 0
edited July 2015 in Free community support

Hi, i'm a new user of DataTables and i want to modify the properties of my table.

Code :
    var table = $('#example').dataTable( {
        ajax: "json-records.json",
        "stateSave": true,
        "columns": [
            { "data": "ID" },
            { "data": "Name" },
            { "data": "Pref_1" },
            { "data": "Pref_2" },
            ],

I want to add an anchor for each ID of my tab. After some research, i find the mrender option but i don't understant how to use it.

Thanks for your help.

Nicolas.

Replies

  • tangerinetangerine Posts: 3,365Questions: 39Answers: 395

    The current version uses "columns.render", documented here:

    https://datatables.net/reference/option/columns.render

    Look for:

    "Use as a function to create a link from the data source:"

  • NicoNBNicoNB Posts: 2Questions: 0Answers: 0

    Thank you for your answer and your reactivity, instead of writting "columnDefs" i use "aoColumns" and it works.
    I don't know if it's a good way but when i replace it by "columnDefs" i have a warning (Requested unknown parameter)

This discussion has been closed.