Setting TD element id's when fetching columns data from Ajax call
Setting TD element id's when fetching columns data from Ajax call
rimshot609
Posts: 9Questions: 6Answers: 0
in General
Is it possible to set the id of a <td> element using Columns Settings when filling table data through Ajax call?
columns: [
{ 'data': "ID", },
{ 'data': "Name" }
]
For example the html would look something like:
<td id="ID">100</td>
<td id="Name">Barney</td>
This discussion has been closed.
Answers
The problem with that is that the ID needs to be unique across the DOM. You could do something like this, using
columns.createdCell
to plum in a unique ID based on the row and column,Colin