Mixed data source

Mixed data source

larrybglarrybg Posts: 14Questions: 5Answers: 0

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.
Thanks

This question has an accepted answers - jump to answer

Answers

  • kthorngrenkthorngren Posts: 21,303Questions: 26Answers: 4,947
    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.

    Kevin

  • larrybglarrybg Posts: 14Questions: 5Answers: 0

    Thank you!
    columns.render worked just fine with function option

This discussion has been closed.