Debugger code (debug.datatables.net): Error messages shown: Description of problem:
This question has an accepted answers - jump to answer
Sorry, I was to fast on the button......
Hello community,
after long time I have a question regarding the column.render function for the child rows.
For the "normal" rows there is no problem, I can show them with this code:
$(document).ready(function() { editor = new $.fn.dataTable.Editor( { ajax: "controllers/staff_veranstaltung.php", table: "#example", template: '#customForm', fields: [ { data: "webproject", render: "[, <br> ].webname" } ],
But to show the same fields in the child row I found no solution at the moment.
function format(d) { // `d` is the original data object for the row return '<table cellpadding="5" cellspacing="0" border="0" style="padding-left:50px;">' + '<tr>' + '<td>Webprojekt:</td>' + '<td>' + d.webproject + ', render: ' + [, ].webname + '</td>' '</tr>' + '</table>'; }
Is there also a possibility to show the content in the child rows?
Thanks a lot for a small hint.
Best regards Mac
That's right, that format, [,].webname, is specific to the columns.render function - you'll need to construct it yourself in your format() function.
[,].webname
columns.render
format()
Colin
Hello Colin,
thanks for the quick answer. If I'll find an appropriate solution, I'll post it here.
Mac
Answers
Sorry, I was to fast on the button......
Hello community,
after long time I have a question regarding the column.render function for the child rows.
For the "normal" rows there is no problem, I can show them with this code:
But to show the same fields in the child row I found no solution at the moment.
Is there also a possibility to show the content in the child rows?
Thanks a lot for a small hint.
Best regards
Mac
That's right, that format,
[,].webname, is specific to thecolumns.renderfunction - you'll need to construct it yourself in yourformat()function.Colin
Hello Colin,
thanks for the quick answer. If I'll find an appropriate solution, I'll post it here.
Mac