Return from many upload in table not editor
Return from many upload in table not editor
jhonny14
Posts: 5Questions: 2Answers: 0
I used this code but it says: "TypeError: table.file(...) is undefined"
Any help is much apreciated.
{ data: "files",
render: function ( d ) {
for(index = 0; index < d.length; index++) {
return d ? table.file( 'files', d ).filename : 'No document';
}
}
}
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
i have made it work with this:
but i dont understand why with .each doesnt work
That would happen if you are using an old version of Editor or you used the
$().dataTable()
constructor rather than$().DataTable()
. Thefile()
method was introduced in Editor 1.5.The
$.each
method doesn't work, because$.each
doesn't do anything with the return. The jQuery documentation says:Allan
so i am using: /*! DataTables Editor v1.5.4
and the constructor: var table = $('#concesiune').DataTable( {
.each method should return this:
it should do for the lenght of data iterate and return the code above
sorry for my poor knowledge
Are you able to give me a link to the page so I can debug it it and see what is going on?
Having said that, if the
$.map
method is working for you - go with that. That is a correct way to do it.Allan