DT 1.10 - Cell rendering
DT 1.10 - Cell rendering
deliator
Posts: 95Questions: 1Answers: 0
Hello,
part of my JS code
var oTable = $('#example').DataTable( {
autoWidth: true,
iDisplayLength: 15,
processing: true,
serverSide: true,
ajax: {
url: 'data.cfm',
dataSrc: 'persons',
statusCode: {
404: function() {
$.dialog('Erreur : La page n\'existe pas.');
},
200: function() {
//$.dialog('Success : La page existe.');
},
500: function() {
$.dialog('Erreur : Une erreur est survenue.');
},
},
beforeSend: function() {
},
},
dom: '<"toolbar">Bfrtip',
select: 'single',
order: [[ 0, "desc" ]],
and for the rendering of column :
{ render: function (data, type, row)
{
data.split('|').forEach(function(ligne) {
console.log(ligne);
return ligne;
});
},
targets: [11]
},
console.log(ligne) give me the value i want to appear in my datatable cell (11) :
<span class="label label-light">This is a test value</span>
I still have this error :
This discussion has been closed.