Unique url per row using Ajax Source

Unique url per row using Ajax Source

agesoneagesone Posts: 7Questions: 0Answers: 0
edited August 2011 in General
Since the JSON response is just values, the datatable will only show the value.. How can I make either a value carry an tag or carryover the the ID of the record parseable within the datatable/client-side?

Replies

  • allanallan Posts: 63,529Questions: 1Answers: 10,473 Site admin
    As you say, it's just values, so just make the value include the A tag in a string format. Something like "str": "..." would do it.

    Allan
  • agesoneagesone Posts: 7Questions: 0Answers: 0
    Is there a workaround to not make the JSON value an tag?
  • GregPGregP Posts: 500Questions: 10Answers: 0
    Just send the unique URL in its own column, keep that column invisible, and use it for whatever you want with the fnRowCallback. You could add the anchor tag wrapping to any other column's content within the callback function instead of within the JSON itself.

    Be mindful of the limitations of markup itself. For example, foo is not valid.

    Which isn't to say you can't make the whole row clickable; just not with an anchor tag.

    But I'm getting ahead of myself: what is the specific use case?
This discussion has been closed.