Configure column rendering using HTML5 data-*

Configure column rendering using HTML5 data-*

sliekenssliekens Posts: 97Questions: 17Answers: 2
edited November 2016 in Free community support

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,819Questions: 1Answers: 10,517 Site admin
    Answer ✓

    No. You cannot define a Javascript function via an HTML 5 data-8 attribute. That is a limitation of using that method and I'm not aware of any way around it. To define a Javascript function you need to use Javascript.

    Allan

  • sliekenssliekens Posts: 97Questions: 17Answers: 2

    Okay so I'm now in a situation where I'm already using data-* attributes to configure my columns and I just found out that I can't configure a renderer in this way.

    Should I start removing the attributes from the HTML and configure columns using the options object or is it safe to combine both?

  • allanallan Posts: 63,819Questions: 1Answers: 10,517 Site admin

    You can combine them: http://live.datatables.net/gilasajo/1/edit - page length and scrolling being set.

    Allan

This discussion has been closed.