Can't add javascript object using row.add function

Can't add javascript object using row.add function

pawan.nogariyapawan.nogariya Posts: 2Questions: 1Answers: 0
edited June 2016 in Free community support

I am trying to add anchor object using row.add method but it seems it is not considering it as javascript object but as a normal object and so just showing its href property as the text in the column.
This is the jsFiddle example https://jsfiddle.net/yza924ws/

Answers

  • Tom (DataTables)Tom (DataTables) Posts: 139Questions: 0Answers: 26

    Currently what you are trying to do isn't possible in datatables.

    You will either have to wrap it up in a tr and then pass that to the API or use a renderer to create the node.

    Thanks

    Tom

  • pawan.nogariyapawan.nogariya Posts: 2Questions: 1Answers: 0

    ok, but wrapping it with tr is also not working. I end up passing the markup string directly

  • allanallan Posts: 63,799Questions: 1Answers: 10,514 Site admin

    It appears to work okay here: https://jsfiddle.net/yza924ws/3/ .

    Allan

This discussion has been closed.