Events for createdCell, createdRow & rowCallback Callbacks

Events for createdCell, createdRow & rowCallback Callbacks

JamaurJamaur Posts: 83Questions: 9Answers: 0

Is there a particular reason why columns.createdCell, createdRow & rowCallback do not have dedicated events like createdCell, createdRow or row?

This question has an accepted answers - jump to answer

Answers

  • ThomDThomD Posts: 334Questions: 11Answers: 43

    those options are effectively the hooks to the events.

  • allanallan Posts: 61,946Questions: 1Answers: 10,158 Site admin
    Answer ✓

    Yes, the reason is performance. The event mechanism currently used (jQuery) is wonderfully flexible, but performance isn't great when there are a large number of events needing to be triggered. Consider for example a table with 10'000 rows and 5 columns, that 50'000 cell created events and 10'000 row created events.

    I plan to do something about this for the next major version of DataTables as I do want to have events for these actions - update and delete as well, but I'm not 100% certain what yet!

    Allan

This discussion has been closed.