Setting TD element id's when fetching columns data from Ajax call

Setting TD element id's when fetching columns data from Ajax call

rimshot609rimshot609 Posts: 9Questions: 6Answers: 0

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>

Answers

  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    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

Sign In or Register to comment.