Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I was able to get it to work using the datables mrenderer</p> <pre><code>$(document).ready(function () { var oTable = $('#example').dataTable({ "aoColumnDefs": [{ "aTargets": [0], //"mData": "download_link", "mRender": function (data, type, full) { if (data == "Gecko") { return '&lt;a href="' + data + '"&gt;' + data + ' Download Gecko&lt;/a&gt;'; } else { return '&lt;a href="' + data + '"&gt;' + data + ' Download&lt;/a&gt;'; } } }, { "aTargets": [1], //"mData": "download_link", "mRender": function (data, type, full) { if (data == "1") { return '&lt;input type=\"checkbox\" checked value="' + data + '"&gt;'; } else { return '&lt;input type=\"checkbox\" value="' + data + '"&gt;'; } } }, { "aTargets": [2], //"mData": "download_link", "mRender": function (data, type, full) { if (data == "1") { return '&lt;input type=\"checkbox\" checked value="' + data + '"&gt;'; } else { return '&lt;input type=\"checkbox\" value="' + data + '"&gt;'; } } }, { "aTargets": [3], //"mData": "download_link", "mRender": function (data, type, full) { if (data == "1") { return '&lt;input type=\"checkbox\" checked value="' + data + '"&gt;'; } else { return '&lt;input type=\"checkbox\" value="' + data + '"&gt;'; } } }, { "aTargets": [4], //"mData": "download_link", "mRender": function (data, type, full) { if (data == "1") { return '&lt;input type=\"checkbox\" checked value="' + data + '"&gt;'; } else { return '&lt;input type=\"checkbox\" value="' + data + '"&gt;'; } } }], "bFilter": false, "sScrollY": "500px", "bPaginate": false, "bProcessing": true, "sAjaxSource": "sources/sample.json" }); }); </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload