How to handle 'extra' data coming from server?
How to handle 'extra' data coming from server?
I have an ajax-sourced client-side processed table. The table is displaying 2 columns, say name, description. However the server also sends the 'id' in the json response. I would like to tag that 'id' on the <tr>
, something like the following:
<tr data-entity-id="???"><td>name</td><td>description</td></tr>
How can I handle this? I understand a callback of some sort has to be used, but not sure.
Thanks.
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
You can use
createdRow
or theDT_RowData
option described in the manual: http://datatables.net/manual/server-side#Returned-dataAllan
This is exactly what I needed, is there anything they didn't think of?
:-)
Thank you.