Callback after data is fully reloaded and all rows drawn

Callback after data is fully reloaded and all rows drawn

terryjbterryjb Posts: 2Questions: 1Answers: 0

Hi all,

I have a need whereby I'm looking to add some additional data as a post-process step and this data cannot be added at the time. It is in effect loaded after the fact.

Is there a callback which signifies the completion of data loading and also rows having been fully rendered?

I don't believe I'm finding anything in the documentation relating to such a callback.

Any help would be appreciated,
Terry

Answers

  • colincolin Posts: 15,112Questions: 1Answers: 2,583

    Hi @terryjb ,

    initComplete will fit the bill,

    Cheers,

    Colin

  • terryjbterryjb Posts: 2Questions: 1Answers: 0

    Hi Colin,

    Thanks for the reply. I did look into this initially but after a little testing it only appears to be called after the initial initialisation of the table and not for any subsequent reloads and redraws.

    I did look at drawCallback however but this was a little overkill.

    Regards,
    Terry

  • kthorngrenkthorngren Posts: 20,144Questions: 26Answers: 4,736

    I did look into this initially but after a little testing it only appears to be called after the initial initialisation of the table and not for any subsequent reloads and redraws.

    Correct.

    Is there a callback which signifies the completion of data loading and also rows having been fully rendered?

    I did look at drawCallback however but this was a little overkill.

    Draw callback will run each time there is a draw of the table. Sounds like this is more often than you need. Are you loading data into the Datatable at different times that you need to preprocess?

    Maybe you can provide more details of what you are doing and what the preprocess process is.

    Kevin

This discussion has been closed.