I have a datatable with JSON as a data source. Is it possible to add a column that is not part of the JSON. I need to have an additional column that contains a link to a page.
This question has an accepted answers - jump to answer
Yes. You can use columns.render. The examples show rendering links with data from the column. But you can do this in a column without data.
Another option is to use columns.defaultContent. This might be better (more efficient) to use if you don't need to use the data from the row to build the link, ie, a static string for the link.
columns.render worked just fine with function option
It looks like you're new here. If you want to get involved, click one of these buttons!
DataTables designed and created by SpryMedia Ltd.
SpryMedia Ltd is registered in Scotland, company no. SC456502.