DT event after complete rendering a table and all buttons?
DT event after complete rendering a table and all buttons?
ajung
Posts: 14Questions: 5Answers: 0
For legacy reasons, we have long HTML table (5000 entries) and apply DataTable to the existing markup.
DT takes a few seconds to initialize the table, render the buttons etc.
I want to hide the table initially and display it after DT is completely finished.
Is there an event that is fired after completion/complete initialization?
We are using latest DT 2 version.
Answers
Yes,
init
is triggered. Or you can also useinitComplete
as a callback if you prefer.One thing to note is that if the table initialisation does not use
ajax
, then its initialisation will be synchronous i.e. theinit
event would already have triggered by the time the code completes running!The new
ready()
function can be used to help address any possible confusion with that.Allan
Thanks!
ready()
did the jobAwesome.
I like the new
ready()
function. It doesn't do anything other code can't, but it does make like a lot easier...Allan