Using template does not use the column render function

Using template does not use the column render function

BoilermakersBoilermakers Posts: 6Questions: 1Answers: 0
edited August 2020 in Free community support

If you look at the example, https://editor.datatables.net/examples/simple/template-attribute.html, you will see that Salary is using the render function. But once you edit the row, the custom template is loaded but the render on Salary is gone.

Please let me know how to use render on custom templates.

Thanks

This question has an accepted answers - jump to answer

Answers

  • colincolin Posts: 15,237Questions: 1Answers: 2,599
    Answer ✓

    That's correct. The salary column is actually a number in the database, so it's being rendered with the currency in the table, but for editing purposes, it reverts back to the true type, which is the number.

    If you want the currency and the full rendering shown in both, it would make sense to change the field to be text, and just display it 'as is',

    Colin

This discussion has been closed.